!function(e){function t(t){for(var n,a,d=t[0],f=t[1],u=t[2],i=0,l=[];i1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=n?t.trim():t,t=a[t]||t;var r=!1;if(e.forEach((function(t){"function"==typeof t&&(r=!0)})),r){for(var i=t.split(new RegExp("{.[0-9]*?}","g")),o=[],s=0;st.length)&&(e=t.length);for(var n=0,r=new Array(e);n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,m=String.fromCharCode;function g(t){throw new RangeError(d[t])}function v(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function y(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+v((t=t.replace(f,".")).split("."),e).join(".")}function b(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=m((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+m(t)})).join("")}function _(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function M(t,e,n){var r=0;for(t=n?p(t/700):t>>1,t+=p(t/e);t>455;r+=36)t=p(t/35);return p(r+36*t/(t+38))}function x(t){var e,n,r,i,o,a,s,l,h,c,f,d=[],m=t.length,v=0,y=128,b=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&g("not-basic"),d.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=m&&g("invalid-input"),((l=(f=t.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||l>p((u-v)/a))&&g("overflow"),v+=l*a,!(l<(h=s<=b?1:s>=b+26?26:s-b));s+=36)a>p(u/(c=36-h))&&g("overflow"),a*=c;b=M(v-o,e=d.length+1,0==o),p(v/e)>u-y&&g("overflow"),y+=p(v/e),v%=e,d.splice(v++,0,y)}return w(d)}function S(t){var e,n,r,i,o,a,s,l,h,c,f,d,v,y,w,x=[];for(d=(t=b(t)).length,e=128,n=0,o=72,a=0;a=e&&fp((u-n)/(v=r+1))&&g("overflow"),n+=(s-e)*v,e=s,a=0;au&&g("overflow"),f==e){for(l=n,h=36;!(l<(c=h<=o?1:h>=o+26?26:h-o));h+=36)w=l-c,y=36-c,x.push(m(_(c+w%y,0))),l=p(w/y);x.push(m(_(l,0))),o=M(n,v,r==i),n=0,++r}++n,++e}return x.join("")}if(a={version:"1.3.2",ucs2:{decode:b,encode:w},decode:x,encode:S,toASCII:function(t){return y(t,(function(t){return h.test(t)?"xn--"+S(t):t}))},toUnicode:function(t){return y(t,(function(t){return l.test(t)?x(t.slice(4).toLowerCase()):t}))}},r&&i)if(t.exports==r)i.exports=a;else for(s in a)a.hasOwnProperty(s)&&(r[s]=a[s]);else n.punycode=a}(c)})),p=f((function(t){!function(e,n){t.exports?t.exports=n():e.IPv6=n(e)}(c,(function(t){var e=t&&t.IPv6;return{best:function(t){var e,n,r=t.toLowerCase().split(":"),i=r.length,o=8;for(""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[i-1]&&""===r[i-2]&&r.pop(),-1!==r[(i=r.length)-1].indexOf(".")&&(o=7),e=0;e1;s++)n.splice(0,1);r[a]=n.join("")}var u=-1,l=0,h=0,c=-1,f=!1;for(a=0;al&&(u=c,l=h)):"0"===r[a]&&(f=!0,c=a,h=1);h>l&&(u=c,l=h),l>1&&r.splice(u,l,""),i=r.length;var d="";for(""===r[0]&&(d=":"),a=0;a=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return!1;var i=n.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(r+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var r=n.list[t.slice(e+1)];return!!r&&r.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return null;var i=n.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(r+1,e)+" ")<0?null:t.slice(r+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n}))})),g=f((function(t){!function(e,n){t.exports?t.exports=n(d,p,m):e.URI=n(e.punycode,e.IPv6,e.SecondLevelDomains,e)}(c,(function(t,e,n,r){var i=r&&r.URI;function o(t,e){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof o))return n?r?new o(t,e):new o(t):new o;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&n)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}o.version="1.19.2";var a=o.prototype,s=Object.prototype.hasOwnProperty;function u(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function h(t){return"Array"===l(t)}function c(t,e){var n,r,i={};if("RegExp"===l(e))i=null;else if(h(e))for(n=0,r=e.length;n]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return o.domAttributes[e]}},o.encode=g,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=g,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(t,e){var n=o.encode(t+"");return void 0===e&&(e=o.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},o.decodeQuery=function(t,e){t+="",void 0===e&&(e=o.escapeQuerySpace);try{return o.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var v,y={encode:"encode",decode:"decode"},b=function(t,e){return function(n){try{return o[e](n+"").replace(o.characters[t][e].expression,(function(n){return o.characters[t][e].map[n]}))}catch(t){return n}}};for(v in y)o[v+"PathSegment"]=b("pathname",y[v]),o[v+"UrnPathSegment"]=b("urnpath",y[v]);var w=function(t,e,n){return function(r){var i;i=n?function(t){return o[e](o[n](t))}:o[e];for(var a=(r+"").split(t),s=0,u=a.length;s-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),(n=t.indexOf("?"))>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=o.parseAuthority(t,e)):(n=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(o.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3)?(t=t.substring(n+3),t=o.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0)),e.path=t,e},o.parseHost=function(t,e){t||(t="");var n,r,i=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))n=t.indexOf("]"),e.hostname=t.substring(1,n)||null,e.port=t.substring(n+2,i)||null,"/"===e.port&&(e.port=null);else{var a=t.indexOf(":"),s=t.indexOf("/"),u=t.indexOf(":",a+1);-1!==u&&(-1===s||u-1?r:t.length-1);return i>-1&&(-1===r||i-1?d.slice(0,p)+d.slice(p).replace(a,""):d.replace(a,"")).length<=l[0].length||n.ignore&&n.ignore.test(d))){var v=e(d,h,f=h+d.length,t);void 0!==v?(v=String(v),t=t.slice(0,h)+v+t.slice(f),r.lastIndex=h+v.length):r.lastIndex=f}}return r.lastIndex=0,t},o.ensureValidHostname=function(e,n){var r=!!e,i=!1;if(!!n&&(i=f(o.hostProtocols,n)),i&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(e&&e.match(o.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},o.noConflict=function(t){if(t){var e={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(e.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(e.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=r.SecondLevelDomains.noConflict()),e}return r.URI===this&&(r.URI=i),this},a.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new o(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=_("protocol"),a.username=_("username"),a.password=_("password"),a.hostname=_("hostname"),a.port=_("port"),a.query=M("query","?"),a.fragment=M("fragment","#"),a.search=function(t,e){var n=this.query(t,e);return"string"==typeof n&&n.length?"?"+n:n},a.hash=function(t,e){var n=this.fragment(t,e);return"string"==typeof n&&n.length?"#"+n:n},a.pathname=function(t,e){if(void 0===t||!0===t){var n=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?o.decodeUrnPath:o.decodePath)(n):n}return this._parts.urn?this._parts.path=t?o.recodeUrnPath(t):"":this._parts.path=t?o.recodePath(t):"/",this.build(!e),this},a.path=a.pathname,a.href=function(t,e){var n;if(void 0===t)return this.toString();this._string="",this._parts=o._parts();var r=t instanceof o,i="object"==typeof t&&(t.hostname||t.path||t.pathname);if(t.nodeName&&(t=t[o.getDomAttribute(t)]||"",i=!1),!r&&i&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=o.parse(String(t),this._parts);else{if(!r&&!i)throw new TypeError("invalid input");var a=r?t._parts:t;for(n in a)"query"!==n&&s.call(this._parts,n)&&(this._parts[n]=a[n]);a.query&&this.query(a.query,!1)}return this.build(!e),this},a.is=function(t){var e=!1,r=!1,i=!1,a=!1,s=!1,u=!1,l=!1,h=!this._parts.urn;switch(this._parts.hostname&&(h=!1,r=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),s=(a=!(e=r||i))&&n&&n.has(this._parts.hostname),u=a&&o.idn_expression.test(this._parts.hostname),l=a&&o.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return h;case"absolute":return!h;case"domain":case"name":return a;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return i;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var x=a.protocol,S=a.port,k=a.hostname;a.protocol=function(t,e){if(t&&!(t=t.replace(/:(\/\/)?$/,"")).match(o.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,t,e)},a.scheme=a.protocol,a.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),o.ensureValidPort(t))),S.call(this,t,e))},a.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(t,n))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=n.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(t,this._parts.protocol)}return k.call(this,t,e)},a.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=o(t);return this.protocol(r.protocol()).authority(r.authority()).build(!e),this},a.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},a.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},a.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=o.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==t[t.length-1]&&(t+="@"),o.parseUserinfo(t,this._parts),this.build(!e),this},a.resource=function(t,e){var n;return void 0===t?this.path()+this.search()+this.hash():(n=o.parse(t),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!e),this)},a.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,r),a=new RegExp("^"+u(i));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&o.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,t),this.build(!e),this},a.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(e).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var i=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},a.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==e&&n&&n.list[i.toLowerCase()]&&n.get(this._parts.hostname)||i}var o;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t)}return this.build(!e),this},a.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?o.decodePath(r):r}var i=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,i),s=new RegExp("^"+u(a));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t),this.build(!e),this},a.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return t?o.decodePathSegment(r):r}var i=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(i=!0);var a=new RegExp(u(this.filename())+"$");return t=o.recodePath(t),this._parts.path=this._parts.path.replace(a,t),i?this.normalizePath(e):this.build(!e),this},a.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,i=this.filename(),a=i.lastIndexOf(".");return-1===a?"":(n=i.substring(a+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",t?o.decodePathSegment(r):r)}"."===t.charAt(0)&&(t=t.substring(1));var s,l=this.suffix();if(l)s=t?new RegExp(u(l)+"$"):new RegExp(u("."+l)+"$");else{if(!t)return this;this._parts.path+="."+o.recodePath(t)}return s&&(t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t)),this.build(!e),this},a.segment=function(t,e,n){var r=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(r);if(void 0!==t&&"number"!=typeof t&&(n=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(o&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(h(e)){a=[];for(var s=0,u=e.length;s1&&void 0!==arguments[1]?arguments[1]:[];if(r(this,t),this.cache={},void 0===e){var i=document.getElementById("strip-html-extension");this.stripHtmlExtension=i&&"true"===i.getAttribute("content")}else this.stripHtmlExtension=e;if(!n.length){var o=document.getElementById("resource-resolver-mappings");n=o?JSON.parse(o.text):n}this.mappings=n.filter((function(t){return"/-/"!==t})).map((function(t){return new v(t)}))}return o(t,[{key:"shouldStripHtmlExtension",value:function(){return this.stripHtmlExtension}},{key:"get",value:function(t){if(!t)return null;t=t.trim();var e=new g(t);return t in this.cache?this.cache[t]:e.toString()===e.fragment()||"/"===e.path()||e.is("absolute")||e.suffix()&&"html"!==e.suffix()?this.cache[t]=this.map(t):this.shouldStripHtmlExtension()?this.cache[t]=this.map(e.suffix("").toString()):this.cache[t]=this.map(e.suffix(".html").toString())}},{key:"map",value:function(t){if(t.startsWith("/")){var e,n=function(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(this.mappings);try{for(n.s();!(e=n.n()).done;){var r=e.value.map(t);if(t!==r)return r}}catch(t){n.e(t)}finally{n.f()}}return t}}]),t}(),b=new y,w=u.get}).call(this,n(25))},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){var r=n(107),i=Function.prototype,o=i.bind,a=i.call,s=r&&o.bind(a,a);t.exports=r?function(t){return t&&s(t)}:function(t){return t&&function(){return a.apply(t,arguments)}}},function(t,e,n){var r=n(28),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),o(i,a),a.from=function(t,e,n){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!==typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"===typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(156);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(t,e)||Object(r.a)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},function(t,e,n){var r=n(20),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},,,,function(t,e,n){var r=n(18),i=n(92),o=n(29),a=n(137),s=n(90),u=n(241),l=i("wks"),h=r.Symbol,c=h&&h.for,f=u?h:h&&h.withoutSetter||a;t.exports=function(t){if(!o(l,t)||!s&&"string"!=typeof l[t]){var e="Symbol."+t;s&&o(h,t)?l[t]=h[t]:l[t]=u&&c?c(e):f(e)}return l[t]}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n(25))},function(t,e,n){var r=n(5);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(24);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},function(t,e,n){var r=n(38),i=Object;t.exports=function(t){return i(r(t))}},function(t,e,n){var r=n(141),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,n){var r=n(107),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,l=[],h=!1,c=-1;function f(){h&&u&&(h=!1,u.length?l=u.concat(l):c=-1,l.length&&d())}function d(){if(!h){var t=s(f);h=!0;for(var e=l.length;e;){for(u=l,l=[];++c1)for(var n=1;n=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return z(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,i);if("number"===typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var h=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){for(var c=!0,f=0;fi&&(r=i):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function k(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:l>223?3:l>191?2:1;if(i+c<=n)switch(c){case 1:l<128&&(h=l);break;case 2:128===(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),l=this.slice(r,i),h=t.slice(e,n),c=0;ci)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return M(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function R(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function D(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function I(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(t,e,n,r,o){return o||I(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,o){return o||I(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||N(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return j(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return j(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function q(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(25))},function(t,e,n){var r=n(8),i=n(21),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},function(t,e,n){var r=n(19),i=n(242),o=n(243),a=n(13),s=n(75),u=TypeError,l=Object.defineProperty,h=Object.getOwnPropertyDescriptor;e.f=r?o?function(t,e,n){if(a(t),e=s(e),a(n),"function"===typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=h(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(a(t),e=s(e),a(n),i)try{return l(t,e,n)}catch(r){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(383),i=n(29),o=n(248),a=n(30).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},,,function(t,e,n){var r=n(79);t.exports=function(t){return r(t.length)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(39);var i=n(83),o=n(104);var a=function(){return"function"===typeof Symbol&&Symbol.observable||"@@observable"}();function s(t){return t}function u(t){return 0===t.length?s:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var l=n(41),h=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var a=this.operator,s=function(t,e,n){if(t){if(t instanceof r.a)return t;if(t[i.a])return t[i.a]()}return t||e||n?new r.a(t,e,n):new r.a(o.a)}(t,e,n);if(a?s.add(a.call(s,this.source)):s.add(this.source||l.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),l.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){l.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),!function(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.a?i:null}return!0}(t)?console.warn(e):t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=c(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(n){r(n),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[a]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e"+u+""}},function(t,e,n){var r=n(5);t.exports=function(t){return r((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,n){"use strict";var r=n(353),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return"undefined"===typeof t}function s(t){return null!==t&&"object"===typeof t}function u(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,r[a]=s,o.iushrn(1)}return r},r.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var r,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var a,s,u=t.andln(3)+i&3,l=e.andln(3)+o&3;3===u&&(u=-1),3===l&&(l=-1),a=0===(1&u)?0:3!==(r=t.andln(7)+i&7)&&5!==r||2!==l?u:-u,n[0].push(a),s=0===(1&l)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==u?l:-l,n[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return n},r.cachedProperty=function(t,e,n){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(t){return"string"===typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new i(t,"hex","le")}},,function(t,e,n){"use strict";var r=n(50),i=n(6);function o(t,e){return 55296===(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),i=0;i>6|192,n[r++]=63&a|128):o(t,i)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i>>0}return a},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],o=r+t[e+1]>>>0,a=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,o,a,s){var u=0,l=e;return u+=(l=l+r>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,n,r,i,o,a,s){return e+r+o+s>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,a,s,u,l){var h=0,c=e;return h+=(c=c+r>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,n,r,i,o,a,s,u,l){return e+r+o+s+l>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},,function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(7);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function l(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"===typeof t)return this._initNumber(t,e,n);if("object"===typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=u(t,e,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(t.length-e)%2===0?e+1:e;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,h=n;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l>>26,c=67108863&u,f=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}n.words[l]=0|c,u=0|h}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?h[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=c[t],d=f[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:h[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,l=new t(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),l[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0===(8191&e)&&(n+=13,e>>>=13),0===(127&e)&&(n+=7,e>>>=7),0===(15&e)&&(n+=4,e>>>=4),0===(3&e)&&(n+=2,e>>>=2),0===(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],E=8191&k,T=k>>>13,A=0|a[6],C=8191&A,O=A>>>13,P=0|a[7],N=8191&P,R=P>>>13,D=0|a[8],I=8191&D,j=D>>>13,L=0|a[9],B=8191&L,F=L>>>13,z=0|s[0],U=8191&z,q=z>>>13,H=0|s[1],W=8191&H,V=H>>>13,Y=0|s[2],Z=8191&Y,G=Y>>>13,K=0|s[3],$=8191&K,Q=K>>>13,X=0|s[4],J=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ht=0|s[8],ct=8191&ht,ft=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(l+(r=Math.imul(c,U))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(f,U)|0))<<13)|0;l=((o=Math.imul(f,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,q))+Math.imul(m,U)|0,o=Math.imul(m,q);var vt=(l+(r=r+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(f,W)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,U),i=(i=Math.imul(v,q))+Math.imul(y,U)|0,o=Math.imul(y,q),r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var yt=(l+(r=r+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(f,Z)|0))<<13)|0;l=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,q))+Math.imul(_,U)|0,o=Math.imul(_,q),r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var bt=(l+(r=r+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,Q)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,q))+Math.imul(S,U)|0,o=Math.imul(S,q),r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,V)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Q)|0;var wt=(l+(r=r+Math.imul(c,J)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(f,J)|0))<<13)|0;l=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,q))+Math.imul(T,U)|0,o=Math.imul(T,q),r=r+Math.imul(x,W)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,V)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(r=r+Math.imul(c,nt)|0)|0)+((8191&(i=(i=i+Math.imul(c,rt)|0)+Math.imul(f,nt)|0))<<13)|0;l=((o=o+Math.imul(f,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(C,U),i=(i=Math.imul(C,q))+Math.imul(O,U)|0,o=Math.imul(O,q),r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(l+(r=r+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,at)|0)+Math.imul(f,ot)|0))<<13)|0;l=((o=o+Math.imul(f,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,U),i=(i=Math.imul(N,q))+Math.imul(R,U)|0,o=Math.imul(R,q),r=r+Math.imul(C,W)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Q)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(l+(r=r+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((o=o+Math.imul(f,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,q))+Math.imul(j,U)|0,o=Math.imul(j,q),r=r+Math.imul(N,W)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,r=r+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var St=(l+(r=r+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(f,ct)|0))<<13)|0;l=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,q))+Math.imul(F,U)|0,o=Math.imul(F,q),r=r+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,V)|0,r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,r=r+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ft)|0;var kt=(l+(r=r+Math.imul(c,pt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((o=o+Math.imul(f,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,W),i=(i=Math.imul(B,V))+Math.imul(F,W)|0,o=Math.imul(F,V),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,G)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(E,nt)|0,i=(i=i+Math.imul(E,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,r=r+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(y,ct)|0,o=o+Math.imul(y,ft)|0;var Et=(l+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,G))+Math.imul(F,Z)|0,o=Math.imul(F,G),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,Q)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,lt)|0,r=r+Math.imul(w,ct)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,ft)|0;var Tt=(l+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,Q))+Math.imul(F,$)|0,o=Math.imul(F,Q),r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,r=r+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,lt)|0,r=r+Math.imul(x,ct)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(S,ct)|0,o=o+Math.imul(S,ft)|0;var At=(l+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,tt))+Math.imul(F,J)|0,o=Math.imul(F,tt),r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,r=r+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,ft)|0;var Ct=(l+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;l=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,lt)|0,r=r+Math.imul(C,ct)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,ft)|0;var Ot=(l+(r=r+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(T,pt)|0))<<13)|0;l=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,lt)|0,r=r+Math.imul(N,ct)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,ft)|0;var Pt=(l+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,lt))+Math.imul(F,ut)|0,o=Math.imul(F,lt),r=r+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ft)|0;var Nt=(l+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(R,pt)|0))<<13)|0;l=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(B,ct),i=(i=Math.imul(B,ft))+Math.imul(F,ct)|0,o=Math.imul(F,ft);var Rt=(l+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(j,pt)|0))<<13)|0;l=((o=o+Math.imul(j,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Dt=(l+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(F,pt)|0))<<13)|0;return l=((o=Math.imul(F,mt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=Et,u[11]=Tt,u[12]=At,u[13]=Ct,u[14]=Ot,u[15]=Pt,u[16]=Nt,u[17]=Rt,u[18]=Dt,0!==l&&(u[19]=l,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==h||l>=i);l--){var c=0|this.words[l];this.words[l]=h<<26-o|c>>>o,h=c&s}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;c--){var f=67108864*(0|r.words[i.length+c])+(0|r.words[i.length+c-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(i,f,c);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,c),r.isZero()||(r.negative^=1);s&&(s.words[c]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++l;for(var h=n.clone(),c=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(l)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,h=1;0===(e.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,f=1;0===(n.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return v[t]=e,e},x.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,l).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var l=e.words[r],h=u-1;h>=0;h--){var c=l>>h&1;i!==n[0]&&(i=this.sqr(i)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===r&&0===h)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,x),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(70)(t))},,,,,function(t,e){t.exports=!1},function(t,e,n){var r=n(380);t.exports=function(t){var e=+t;return e!==e||0===e?0:r(e)}},function(t,e,n){"use strict";var r=n(75),i=n(30),o=n(89);t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},function(t,e,n){var r=n(29),i=n(24),o=n(21),a=n(138),s=n(185),u=a("IE_PROTO"),l=Object,h=l.prototype;t.exports=s?l.getPrototypeOf:function(t){var e=o(t);if(r(e,u))return e[u];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof l?h:null}},function(t,e,n){var r=n(17),i=n(94),o=n(30).f,a=r("unscopables"),s=Array.prototype;void 0==s[a]&&o(s,a,{configurable:!0,value:i(null)}),t.exports=function(t){s[a][t]=!0}},function(t,e,n){var r=n(9).Buffer,i=n(529).Transform,o=n(81).StringDecoder;function a(t){i.call(this),this.hashMode="string"===typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(6)(a,i),a.prototype.update=function(t,e,n){"string"===typeof t&&(t=r.from(t,e));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(i){r=i}finally{n(r)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(n){e=n}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r},t.exports=a},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){t.exports=n(629)()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){for(var n=0;n0?i(r(t),9007199254740991):0}},function(t,e,n){"use strict";var r,i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!==t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"===typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}v(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"===typeof t.on&&v(t,"error",e,n)}(t,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function l(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function h(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function c(t,e,n,r){var i,o,a,s;if(l(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),a=o[e]),void 0===a)a=o[e]=n,++t._eventsCount;else if("function"===typeof a?a=o[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=h(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function p(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[t];if(void 0===u)return!1;if("function"===typeof u)o(u,this,e);else{var l=u.length,h=g(u,l);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){"use strict";var r=n(9).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!==typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=l,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=h,this.end=c,e=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2===0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function h(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(t.lastNeed=i-1),i;if(--r=0)return i>0&&(t.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";var r=n(148),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var o=Object.create(n(121));o.inherits=n(6);var a=n(310),s=n(205);o.inherits(c,a);for(var u=i(s.prototype),l=0;l"+t+"<\/script>"},p=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}m="undefined"!=typeof document?document.domain&&r?p(r):function(){var t,e=l("iframe");return e.style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F}():p(r);for(var t=a.length;t--;)delete m.prototype[a[t]];return m()};s[c]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(f.prototype=i(t),n=new f,f.prototype=null,n[c]=t):n=m(),void 0===e?n:o.f(n,e)}},function(t,e,n){var r=n(30).f,i=n(29),o=n(17)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!i(t,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(142),i=n(8),o=n(133),a=n(21),s=n(34),u=n(112),l=i([].push),h=function(t){var e=1==t,n=2==t,i=3==t,h=4==t,c=6==t,f=7==t,d=5==t||c;return function(p,m,g,v){for(var y,b,w=a(p),_=o(w),M=r(m,g),x=s(_),S=0,k=v||u,E=e?k(p,x):n||f?k(p,0):void 0;x>S;S++)if((d||S in _)&&(b=M(y=_[S],S,w),t))if(e)E[S]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:l(E,y)}else switch(t){case 4:return!1;case 7:l(E,y)}return c?-1:i||h?h:E}};t.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6),filterReject:h(7)}},function(t,e,n){"use strict";(function(e,r){var i=n(9).Buffer,o=e.crypto||e.msCrypto;o&&o.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(t);if(t>0)if(t>65536)for(var a=0;a2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,a,s;if("string"===typeof e&&(i="not ",e.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var u=function(t,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(r," ").concat(o(e,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,n){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=l;var i=n(302),o=n(306);n(6)(l,i);for(var a=r(o.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,n){"use strict";var r={};function i(t,e,n){n||(n=Error);var i=function(t){var n,r;function i(n,r,i){return t.call(this,function(t,n,r){return"string"===typeof e?e:e(t,n,r)}(n,r,i))||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=t,r[t]=i}function o(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,a,s;if("string"===typeof e&&(i="not ",e.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var u=function(t,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(r," ").concat(o(e,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,n){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=l;var i=n(332),o=n(336);n(6)(l,i);for(var a=r(o.prototype),s=0;s=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var r=n(8),i=n(38),o=n(22),a=n(144),s=r("".replace),u="["+a+"]",l=RegExp("^"+u+u+"*"),h=RegExp(u+u+"*$"),c=function(t){return function(e){var n=o(i(e));return 1&t&&(n=s(n,l,"")),2&t&&(n=s(n,h,"")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},function(t,e,n){"use strict";var r=n(6),i=n(199),o=n(202),a=n(203),s=n(69);function u(t){s.call(this,"digest"),this._hash=t}r(u,s),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(a(t))}},function(t,e,n){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"===typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"===typeof t},e.isString=function(t){return"string"===typeof t},e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"===typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"===typeof t},e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=n(28).Buffer.isBuffer},function(t,e,n){(function(e){t.exports=function(t,n){for(var r=Math.min(t.length,n.length),i=new e(r),o=0;o=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;ot.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},function(t,e,n){var r=n(8),i=0,o=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},function(t,e,n){var r=n(92),i=n(137),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e,n){var r=n(245),i=n(174).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(175),i=n(24),o=n(57),a=n(17)("toStringTag"),s=Object,u="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=s(t),a))?n:u?o(e):"Object"==(r=o(e))&&i(e.callee)?"Arguments":r}},function(t,e,n){var r=n(8),i=n(58),o=n(107),a=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";var r=n(64),i=n(18),o=n(5),a=n(253);t.exports=r||!o((function(){if(!(a&&a<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete i[t]}}))},function(t,e){t.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(t,e,n){"use strict";var r=n(23),i=n(8),o=n(22),a=n(448),s=n(291),u=n(92),l=n(94),h=n(109).get,c=n(449),f=n(450),d=u("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,m=p,g=i("".charAt),v=i("".indexOf),y=i("".replace),b=i("".slice),w=function(){var t=/a/,e=/b*/g;return r(p,t,"a"),r(p,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),_=s.BROKEN_CARET,M=void 0!==/()??/.exec("")[1];(w||M||_||c||f)&&(m=function(t){var e,n,i,s,u,c,f,x=this,S=h(x),k=o(t),E=S.raw;if(E)return E.lastIndex=x.lastIndex,e=r(m,E,k),x.lastIndex=E.lastIndex,e;var T=S.groups,A=_&&x.sticky,C=r(a,x),O=x.source,P=0,N=k;if(A&&(C=y(C,"y",""),-1===v(C,"g")&&(C+="g"),N=b(k,x.lastIndex),x.lastIndex>0&&(!x.multiline||x.multiline&&"\n"!==g(k,x.lastIndex-1))&&(O="(?: "+O+")",N=" "+N,P++),n=new RegExp("^(?:"+O+")",C)),M&&(n=new RegExp("^"+O+"$(?!\\s)",C)),w&&(i=x.lastIndex),s=r(p,A?n:x,N),A?s?(s.input=b(s.input,P),s[0]=b(s[0],P),s.index=x.lastIndex,x.lastIndex+=s[0].length):x.lastIndex=0:w&&s&&(x.lastIndex=x.global?s.index+s[0].length:i),M&&s&&s.length>1&&r(d,s[0],n,(function(){for(u=1;u>>24]^h[p>>>16&255]^c[m>>>8&255]^f[255&g]^e[v++],a=l[p>>>24]^h[m>>>16&255]^c[g>>>8&255]^f[255&d]^e[v++],s=l[m>>>24]^h[g>>>16&255]^c[d>>>8&255]^f[255&p]^e[v++],u=l[g>>>24]^h[d>>>16&255]^c[p>>>8&255]^f[255&m]^e[v++],d=o,p=a,m=s,g=u;return o=(r[d>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^e[v++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&d])^e[v++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[d>>>8&255]<<8|r[255&p])^e[v++],u=(r[g>>>24]<<24|r[d>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[v++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var l=s^s<<1^s<<2^s<<3^s<<4;l=l>>>8^255&l^99,n[a]=l,r[l]=a;var h=t[a],c=t[h],f=t[c],d=257*t[l]^16843008*l;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*f^65537*c^257*h^16843008*a,o[0][l]=d<<24|d>>>8,o[1][l]=d<<16|d>>>16,o[2][l]=d<<8|d>>>24,o[3][l]=d,0===a?a=s=1:(a=h^t[t[t[f^h]]],s^=t[t[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function l(t){this._key=i(t),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,r=4*(n+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e===4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-e]^a}for(var l=[],h=0;h>>24]]^u.INV_SUB_MIX[1][u.SBOX[f>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[f>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&f]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},l.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=r.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},l.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var n=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},l.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=l},function(t,e,n){var r=n(9).Buffer,i=n(199);t.exports=function(t,e,n,o){if(r.isBuffer(t)||(t=r.from(t,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=r.alloc(a),u=r.alloc(o||0),l=r.alloc(0);a>0||o>0;){var h=new i;h.update(l),h.update(t),e&&h.update(e),l=h.digest();var c=0;if(a>0){var f=s.length-a;c=Math.min(a,l.length),l.copy(s,f,0,c),a-=c}if(c0){var d=u.length-o,p=Math.min(o,l.length-c);l.copy(u,d,c,c+p),o-=p}}return l.fill(0),{key:s,iv:u}}},function(t,e,n){"use strict";var r=n(59),i=n(51),o=i.getNAF,a=i.getJSF,s=i.assert;function u(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var n=t._getDoubles(),r=o(e,1,this._bitLength),i=(1<=a;h--)u=(u<<1)+r[h];l.push(u)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a=0;l--){for(var h=0;l>=0&&0===a[l];l--)h++;if(l>=0&&h++,u=u.dblp(h),l<0)break;var c=a[l];s(0!==c),u="affine"===t.type?c>0?u.mixedAdd(i[c-1>>1]):u.mixedAdd(i[-c-1>>1].neg()):c>0?u.add(i[c-1>>1]):u.add(i[-c-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,n,r,i){var s,u,l,h=this._wnafT1,c=this._wnafT2,f=this._wnafT3,d=0;for(s=0;s=1;s-=2){var m=s-1,g=s;if(1===h[m]&&1===h[g]){var v=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(v[1]=e[m].add(e[g]),v[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(v[1]=e[m].toJ().mixedAdd(e[g]),v[2]=e[m].add(e[g].neg())):(v[1]=e[m].toJ().mixedAdd(e[g]),v[2]=e[m].toJ().mixedAdd(e[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=a(n[m],n[g]);for(d=Math.max(b[0].length,d),f[m]=new Array(d),f[g]=new Array(d),u=0;u=0;s--){for(var S=0;s>=0;){var k=!0;for(u=0;u=0&&S++,M=M.dblp(S),s<0)break;for(u=0;u0?l=c[u][E-1>>1]:E<0&&(l=c[u][-E-1>>1].neg()),M="affine"===l.type?M.mixedAdd(l):M.add(l))}}for(s=0;s=Math.ceil((t.bitLength()+1)/e.step)},l.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;it?e:t}),r)}}(t.id,r(t.chart),t.min,t.max);"undefined"===typeof t.options.ticks.min&&"undefined"===typeof t.options.ticks.suggestedMin&&(t.min=e.min),"undefined"===typeof t.options.ticks.max&&"undefined"===typeof t.options.ticks.suggestedMax&&(t.max=e.max),t.handleTickRangeOptions&&t.handleTickRangeOptions()},getNearestItems:function(t,n){var r=Number.POSITIVE_INFINITY;return t.filter((function(t){return t.inRange(n.x,n.y)})).reduce((function(t,i){var o=i.getCenterPoint(),a=e.distanceBetweenPoints(n,o);return ar||n=2&&(n=n.slice(2)):m(i)?n=r[4]:i?o&&(n=n.slice(2)):u>=2&&m(e.protocol)&&(n=r[4]),{protocol:i,slashes:o||m(i),slashesCount:u,rest:n}}function v(t,e,n){if(t=(t=c(t)).replace(a,""),!(this instanceof v))return new v(t,e,n);var o,s,u,l,d,y,b=f.slice(),w=typeof e,_=this,M=0;for("object"!==w&&"string"!==w&&(n=e,e=null),n&&"function"!==typeof n&&(n=i.parse),o=!(s=g(t||"",e=p(e))).protocol&&!s.slashes,_.slashes=s.slashes||o&&e.slashes,_.protocol=s.protocol||e.protocol||"",t=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||h.test(t))||!s.slashes&&(s.protocol||s.slashesCount<2||!m(_.protocol)))&&(b[3]=[/(.*)/,"pathname"]);M9007199254740991)throw n("Maximum allowed index exceeded");return t}},function(t,e,n){"use strict";var r=n(91),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw i("Cannot delete property "+r(e)+" of "+r(t))}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},function(t,e,n){"use strict";var r=n(65),i=n(22),o=n(38),a=RangeError;t.exports=function(t){var e=i(o(this)),n="",s=r(t);if(s<0||s==1/0)throw a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(n+=e);return n}},function(t,e,n){var r=n(8),i=n(65),o=n(22),a=n(38),s=r("".charAt),u=r("".charCodeAt),l=r("".slice),h=function(t){return function(e,n){var r,h,c=o(a(e)),f=i(n),d=c.length;return f<0||f>=d?t?"":void 0:(r=u(c,f))<55296||r>56319||f+1===d||(h=u(c,f+1))<56320||h>57343?t?s(c,f):r:t?l(c,f,f+2):h-56320+(r-55296<<10)+65536}};t.exports={codeAt:h(!1),charAt:h(!0)}},function(t,e,n){var r=n(292),i=TypeError;t.exports=function(t){if(r(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,n){var r=n(17)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(i){}}return!1}},function(t,e,n){"use strict";var r=n(194).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(171).PROPER,i=n(5),o=n(144);t.exports=function(t){return i((function(){return!!o[t]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[t]()||r&&o[t].name!==t}))}},function(t,e,n){"use strict";var r=n(6),i=n(301),o=n(9).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<>>32-e}function l(t,e,n,r,i,o,a){return u(t+(e&n|~e&r)+i+o|0,a)+e|0}function h(t,e,n,r,i,o,a){return u(t+(e&r|n&~r)+i+o|0,a)+e|0}function c(t,e,n,r,i,o,a){return u(t+(e^n^r)+i+o|0,a)+e|0}function f(t,e,n,r,i,o,a){return u(t+(n^(e|~r))+i+o|0,a)+e|0}r(s,i),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,r=this._b,i=this._c,o=this._d;n=l(n,r,i,o,t[0],3614090360,7),o=l(o,n,r,i,t[1],3905402710,12),i=l(i,o,n,r,t[2],606105819,17),r=l(r,i,o,n,t[3],3250441966,22),n=l(n,r,i,o,t[4],4118548399,7),o=l(o,n,r,i,t[5],1200080426,12),i=l(i,o,n,r,t[6],2821735955,17),r=l(r,i,o,n,t[7],4249261313,22),n=l(n,r,i,o,t[8],1770035416,7),o=l(o,n,r,i,t[9],2336552879,12),i=l(i,o,n,r,t[10],4294925233,17),r=l(r,i,o,n,t[11],2304563134,22),n=l(n,r,i,o,t[12],1804603682,7),o=l(o,n,r,i,t[13],4254626195,12),i=l(i,o,n,r,t[14],2792965006,17),n=h(n,r=l(r,i,o,n,t[15],1236535329,22),i,o,t[1],4129170786,5),o=h(o,n,r,i,t[6],3225465664,9),i=h(i,o,n,r,t[11],643717713,14),r=h(r,i,o,n,t[0],3921069994,20),n=h(n,r,i,o,t[5],3593408605,5),o=h(o,n,r,i,t[10],38016083,9),i=h(i,o,n,r,t[15],3634488961,14),r=h(r,i,o,n,t[4],3889429448,20),n=h(n,r,i,o,t[9],568446438,5),o=h(o,n,r,i,t[14],3275163606,9),i=h(i,o,n,r,t[3],4107603335,14),r=h(r,i,o,n,t[8],1163531501,20),n=h(n,r,i,o,t[13],2850285829,5),o=h(o,n,r,i,t[2],4243563512,9),i=h(i,o,n,r,t[7],1735328473,14),n=c(n,r=h(r,i,o,n,t[12],2368359562,20),i,o,t[5],4294588738,4),o=c(o,n,r,i,t[8],2272392833,11),i=c(i,o,n,r,t[11],1839030562,16),r=c(r,i,o,n,t[14],4259657740,23),n=c(n,r,i,o,t[1],2763975236,4),o=c(o,n,r,i,t[4],1272893353,11),i=c(i,o,n,r,t[7],4139469664,16),r=c(r,i,o,n,t[10],3200236656,23),n=c(n,r,i,o,t[13],681279174,4),o=c(o,n,r,i,t[0],3936430074,11),i=c(i,o,n,r,t[3],3572445317,16),r=c(r,i,o,n,t[6],76029189,23),n=c(n,r,i,o,t[9],3654602809,4),o=c(o,n,r,i,t[12],3873151461,11),i=c(i,o,n,r,t[15],530742520,16),n=f(n,r=c(r,i,o,n,t[2],3299628645,23),i,o,t[0],4096336452,6),o=f(o,n,r,i,t[7],1126891415,10),i=f(i,o,n,r,t[14],2878612391,15),r=f(r,i,o,n,t[5],4237533241,21),n=f(n,r,i,o,t[12],1700485571,6),o=f(o,n,r,i,t[3],2399980690,10),i=f(i,o,n,r,t[10],4293915773,15),r=f(r,i,o,n,t[1],2240044497,21),n=f(n,r,i,o,t[8],1873313359,6),o=f(o,n,r,i,t[15],4264355552,10),i=f(i,o,n,r,t[6],2734768916,15),r=f(r,i,o,n,t[13],1309151649,21),n=f(n,r,i,o,t[4],4149444226,6),o=f(o,n,r,i,t[11],3174756917,10),i=f(i,o,n,r,t[2],718787259,15),r=f(r,i,o,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(r){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(25))},function(t,e,n){"use strict";var r=n(98).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"===typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i>>32-e}function m(t,e,n,r,i,o,a,s){return p(t+(e^n^r)+o+a|0,s)+i|0}function g(t,e,n,r,i,o,a,s){return p(t+(e&n|~e&r)+o+a|0,s)+i|0}function v(t,e,n,r,i,o,a,s){return p(t+((e|~n)^r)+o+a|0,s)+i|0}function y(t,e,n,r,i,o,a,s){return p(t+(e&r|n&~r)+o+a|0,s)+i|0}function b(t,e,n,r,i,o,a,s){return p(t+(e^(n|~r))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,x=0|this._d,S=0|this._e,k=0;k<80;k+=1){var E,T;k<16?(E=m(n,r,i,o,d,t[s[k]],c[0],l[k]),T=b(w,_,M,x,S,t[u[k]],f[0],h[k])):k<32?(E=g(n,r,i,o,d,t[s[k]],c[1],l[k]),T=y(w,_,M,x,S,t[u[k]],f[1],h[k])):k<48?(E=v(n,r,i,o,d,t[s[k]],c[2],l[k]),T=v(w,_,M,x,S,t[u[k]],f[2],h[k])):k<64?(E=y(n,r,i,o,d,t[s[k]],c[3],l[k]),T=g(w,_,M,x,S,t[u[k]],f[3],h[k])):(E=b(n,r,i,o,d,t[s[k]],c[4],l[k]),T=m(w,_,M,x,S,t[u[k]],f[4],h[k])),n=d,d=o,o=p(i,10),i=r,r=E,w=S,S=x,x=p(M,10),M=_,_=T}var A=this._b+i+x|0;this._b=this._c+o+S|0,this._c=this._d+d+w|0,this._d=this._e+n+_|0,this._e=this._a+r+M|0,this._a=A},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=r.alloc?r.alloc(20):new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(525),e.sha1=n(526),e.sha224=n(527),e.sha256=n(308),e.sha384=n(528),e.sha512=n(309)},function(t,e,n){(e=t.exports=n(310)).Stream=e,e.Readable=e,e.Writable=n(205),e.Duplex=n(82),e.Transform=n(313),e.PassThrough=n(533)},function(t,e,n){"use strict";(function(e,r,i){var o=n(148);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var s,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;y.WritableState=v;var l=Object.create(n(121));l.inherits=n(6);var h={deprecate:n(200)},c=n(311),f=n(9).Buffer,d=i.Uint8Array||function(){};var p,m=n(312);function g(){}function v(t,e){s=s||n(82),t=t||{};var r=e instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,l=t.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(l||0===l)?l:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===t.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),S(t,e))}(t,n,r,e,i);else{var a=M(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||_(t,n),r?u(w,t,n,a,i):w(t,n,a,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function y(t){if(s=s||n(82),!p.call(y,this)&&!(this instanceof s))return new y(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),c.call(this)}function b(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),S(t,e)}function _(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,h=n.encoding,c=n.callback;if(b(t,e,!1,e.objectMode?1:l.length,l,h,c),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function M(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),S(t,e)}))}function S(t,e){var n=M(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(x,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}l.inherits(y,c),v.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:h.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===y&&(t&&t._writableState instanceof v)}})):p=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=t,f.isBuffer(r)||r instanceof d);return s&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"===typeof e&&(n=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!==typeof n&&(n=g),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(s||function(t,e,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"===typeof n||void 0===n||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,t,n))&&(i.pendingcb++,a=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=f.from(e,n));return e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,n){var r=this._writableState;"function"===typeof t?(n=t,t=null,e=null):"function"===typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,S(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(26),n(299).setImmediate,n(25))},function(t,e,n){"use strict";var r=n(50);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var n=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r0;r--)e+=this._buffer(t,e),n+=this._flushBuffer(i,n);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,n;return t&&(e=this.update(t)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(n):n},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,n){var i=function(t){var e=o(t);return{blinder:e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(n),a=n.modulus.byteLength(),s=new r(t).mul(i.blinder).umod(n.modulus),u=s.toRed(r.mont(n.prime1)),l=s.toRed(r.mont(n.prime2)),h=n.coefficient,c=n.prime1,f=n.prime2,d=u.redPow(n.exponent1).fromRed(),p=l.redPow(n.exponent2).fromRed(),m=d.isub(p).imul(h).umod(c).imul(f);return p.iadd(m).imul(i.unblinder).umod(n.modulus).toArrayLike(e,"be",a)}a.getr=o,t.exports=a}).call(this,n(28).Buffer)},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(573).Buffer}catch(A){}function s(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+t)}function u(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function l(t,e,n,i){for(var o=0,a=0,s=Math.min(t.length,n),u=e;u=49?l-49+10:l>=17?l-17+10:l,r(l>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"===typeof t)return this._initNumber(t,e,n);if("object"===typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=u(t,e,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(t.length-e)%2===0?e+1:e;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,h=n;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(A){o.prototype.inspect=c}else o.prototype.inspect=c;function c(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?f[6-u.length]+u+n:u+n}for(0!==o&&(n=o.toString(16)+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=d[t],h=p[t];n="";var c=this.clone();for(c.negative=0;!c.isZero();){var m=c.modrn(h).toString(t);n=(c=c.idivn(h)).isZero()?m+n:f[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l>>26,c=67108863&u,f=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}n.words[l]=0|c,u=0|h}return 0!==u?n.words[l]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n=0&&(t[n--]=a>>8&255),n>=0&&(t[n--]=a>>16&255),6===o?(n>=0&&(t[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0===(8191&e)&&(n+=13,e>>>=13),0===(127&e)&&(n+=7,e>>>=7),0===(15&e)&&(n+=4,e>>>=4),0===(3&e)&&(n+=2,e>>>=2),0===(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],E=8191&k,T=k>>>13,A=0|a[6],C=8191&A,O=A>>>13,P=0|a[7],N=8191&P,R=P>>>13,D=0|a[8],I=8191&D,j=D>>>13,L=0|a[9],B=8191&L,F=L>>>13,z=0|s[0],U=8191&z,q=z>>>13,H=0|s[1],W=8191&H,V=H>>>13,Y=0|s[2],Z=8191&Y,G=Y>>>13,K=0|s[3],$=8191&K,Q=K>>>13,X=0|s[4],J=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ht=0|s[8],ct=8191&ht,ft=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(l+(r=Math.imul(c,U))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(f,U)|0))<<13)|0;l=((o=Math.imul(f,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,q))+Math.imul(m,U)|0,o=Math.imul(m,q);var vt=(l+(r=r+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(f,W)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,U),i=(i=Math.imul(v,q))+Math.imul(y,U)|0,o=Math.imul(y,q),r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var yt=(l+(r=r+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(f,Z)|0))<<13)|0;l=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,q))+Math.imul(_,U)|0,o=Math.imul(_,q),r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var bt=(l+(r=r+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,Q)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,q))+Math.imul(S,U)|0,o=Math.imul(S,q),r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,V)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Q)|0;var wt=(l+(r=r+Math.imul(c,J)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(f,J)|0))<<13)|0;l=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,q))+Math.imul(T,U)|0,o=Math.imul(T,q),r=r+Math.imul(x,W)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,V)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(r=r+Math.imul(c,nt)|0)|0)+((8191&(i=(i=i+Math.imul(c,rt)|0)+Math.imul(f,nt)|0))<<13)|0;l=((o=o+Math.imul(f,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(C,U),i=(i=Math.imul(C,q))+Math.imul(O,U)|0,o=Math.imul(O,q),r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(l+(r=r+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,at)|0)+Math.imul(f,ot)|0))<<13)|0;l=((o=o+Math.imul(f,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,U),i=(i=Math.imul(N,q))+Math.imul(R,U)|0,o=Math.imul(R,q),r=r+Math.imul(C,W)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Q)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(l+(r=r+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((o=o+Math.imul(f,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,q))+Math.imul(j,U)|0,o=Math.imul(j,q),r=r+Math.imul(N,W)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,r=r+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var St=(l+(r=r+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(f,ct)|0))<<13)|0;l=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,q))+Math.imul(F,U)|0,o=Math.imul(F,q),r=r+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,V)|0,r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,r=r+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ft)|0;var kt=(l+(r=r+Math.imul(c,pt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((o=o+Math.imul(f,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,W),i=(i=Math.imul(B,V))+Math.imul(F,W)|0,o=Math.imul(F,V),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,G)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(E,nt)|0,i=(i=i+Math.imul(E,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,r=r+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(y,ct)|0,o=o+Math.imul(y,ft)|0;var Et=(l+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,G))+Math.imul(F,Z)|0,o=Math.imul(F,G),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,Q)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,lt)|0,r=r+Math.imul(w,ct)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,ft)|0;var Tt=(l+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,Q))+Math.imul(F,$)|0,o=Math.imul(F,Q),r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,r=r+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,lt)|0,r=r+Math.imul(x,ct)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(S,ct)|0,o=o+Math.imul(S,ft)|0;var At=(l+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,tt))+Math.imul(F,J)|0,o=Math.imul(F,tt),r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,r=r+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,ft)|0;var Ct=(l+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;l=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,lt)|0,r=r+Math.imul(C,ct)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,ft)|0;var Ot=(l+(r=r+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(T,pt)|0))<<13)|0;l=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,lt)|0,r=r+Math.imul(N,ct)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,ft)|0;var Pt=(l+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,lt))+Math.imul(F,ut)|0,o=Math.imul(F,lt),r=r+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ft)|0;var Nt=(l+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(R,pt)|0))<<13)|0;l=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(B,ct),i=(i=Math.imul(B,ft))+Math.imul(F,ct)|0,o=Math.imul(F,ft);var Rt=(l+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(j,pt)|0))<<13)|0;l=((o=o+Math.imul(j,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Dt=(l+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(F,pt)|0))<<13)|0;return l=((o=Math.imul(F,mt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=Et,u[11]=Tt,u[12]=At,u[13]=Ct,u[14]=Ot,u[15]=Pt,u[16]=Nt,u[17]=Rt,u[18]=Dt,0!==l&&(u[19]=l,n.length++),n};function v(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function y(t,e,n){return v(t,e,n)}function b(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?m(this,t,e):n<1024?v(this,t,e):y(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},b.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i&1}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==h||l>=i);l--){var c=0|this.words[l];this.words[l]=h<<26-o|c>>>o,h=c&s}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;c--){var f=67108864*(0|r.words[i.length+c])+(0|r.words[i.length+c-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(i,f,c);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,c),r.isZero()||(r.negative^=1);s&&(s.words[c]=f)}return s&&s._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++l;for(var h=n.clone(),c=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(l)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,h=1;0===(e.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,f=1;0===(n.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function T(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(M,_),M.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new x;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return w[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(h(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,l).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var l=e.words[r],h=u-1;h>=0;h--){var c=l>>h&1;i!==n[0]&&(i=this.sqr(i)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===r&&0===h)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new T(t)},i(T,E),T.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},T.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},T.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(70)(t))},function(t,e,n){"use strict";var r=e;r.version=n(574).version,r.utils=n(51),r.rand=n(209),r.curve=n(339),r.curves=n(215),r.ec=n(586),r.eddsa=n(590)},function(t,e,n){"use strict";var r,i=e,o=n(216),a=n(339),s=n(51).assert;function u(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var n=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=u,l("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),l("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),l("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(585)}catch(h){r=void 0}l("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(t,e,n){var r=e;r.utils=n(53),r.common=n(123),r.sha=n(579),r.ripemd=n(583),r.hmac=n(584),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(t,e,n){"use strict";(function(e){var r,i=n(28),o=i.Buffer,a={};for(r in i)i.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=i[r]);var s=a.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(s[r]=o[r]);if(a.Buffer.prototype=o.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(t,e,n){if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&"undefined"===typeof t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return o(t,e,n)}),s.alloc||(s.alloc=function(t,e,n){if("number"!==typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=o(t);return e&&0!==e.length?"string"===typeof n?r.fill(e,n):r.fill(e):r.fill(0),r}),!a.kStringMaxLength)try{a.kStringMaxLength=e.binding("buffer").kStringMaxLength}catch(u){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a}).call(this,n(26))},function(t,e,n){"use strict";var r=n(219).Reporter,i=n(124).EncoderBuffer,o=n(124).DecoderBuffer,a=n(50),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function l(t,e,n){var r={};this._baseState=r,r.name=n,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=l;var h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){var t=this._baseState,e={};h.forEach((function(n){e[n]=t[n]}));var n=new this.constructor(e.parent);return n._baseState=e,n},l.prototype._wrap=function(){var t=this._baseState;u.forEach((function(e){this[e]=function(){var n=new this.constructor(this);return t.children.push(n),n[e].apply(n,arguments)}}),this)},l.prototype._init=function(t){var e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),a.equal(e.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(t){var e=this._baseState,n=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==n.length&&(a(null===e.children),e.children=n,n.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!==typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(n){n==(0|n)&&(n|=0);var r=t[n];e[r]=n})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){l.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),s.forEach((function(t){l.prototype[t]=function(){var e=this._baseState,n=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(n),this}})),l.prototype.use=function(t){a(t);var e=this._baseState;return a(null===e.use),e.use=t,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(t){var e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},l.prototype.explicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},l.prototype.implicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},l.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},l.prototype.key=function(t){var e=this._baseState;return a(null===e.key),e.key=t,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(t){var e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},l.prototype.contains=function(t){var e=this._baseState;return a(null===e.use),e.contains=t,this},l.prototype._decode=function(t,e){var n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));var r,i=n.default,a=!0,s=null;if(null!==n.key&&(s=t.enterKey(n.key)),n.optional){var u=null;if(null!==n.explicit?u=n.explicit:null!==n.implicit?u=n.implicit:null!==n.tag&&(u=n.tag),null!==u||n.any){if(a=this._peekTag(t,u,n.any),t.isError(a))return a}else{var l=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),a=!0}catch(m){a=!1}t.restore(l)}}if(n.obj&&a&&(r=t.enterObject()),a){if(null!==n.explicit){var h=this._decodeTag(t,n.explicit);if(t.isError(h))return h;t=h}var c=t.offset;if(null===n.use&&null===n.choice){var f;n.any&&(f=t.save());var d=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(d))return d;n.any?i=t.raw(f):t=d}if(e&&e.track&&null!==n.tag&&e.track(t.path(),c,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(t,e)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var p=new o(i);i=this._getUse(n.contains,t._reporterState.obj)._decode(p,e)}}return n.obj&&a&&(i=t.leaveObject(r)),null===n.key||null===i&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,n.key,i),i},l.prototype._decodeGeneric=function(t,e,n){var r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],n):/str$/.test(t)?this._decodeStr(e,t,n):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],n):"objid"===t?this._decodeObjid(e,null,null,n):"gentime"===t||"utctime"===t?this._decodeTime(e,t,n):"null_"===t?this._decodeNull(e,n):"bool"===t?this._decodeBool(e,n):"objDesc"===t?this._decodeStr(e,t,n):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,n):e.error("unknown tag: "+t)},l.prototype._getUse=function(t,e){var n=this._baseState;return n.useDecoder=this._use(t,e),a(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},l.prototype._decodeChoice=function(t,e){var n=this._baseState,r=null,i=!1;return Object.keys(n.choice).some((function(o){var a=t.save(),s=n.choice[o];try{var u=s._decode(t,e);if(t.isError(u))return!1;r={type:o,value:u},i=!0}catch(l){return t.restore(a),!1}return!0}),this),i?r:t.error("Choice not matched")},l.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},l.prototype._encode=function(t,e,n){var r=this._baseState;if(null===r.default||r.default!==t){var i=this._encodeValue(t,e,n);if(void 0!==i&&!this._skipDefault(i,e,n))return i}},l.prototype._encodeValue=function(t,e,n){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new r);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)a=this._getUse(i.contains,n)._encode(t,e),s=!0;else if(i.children)a=i.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,e,t);if(null===n._baseState.key)return e.error("Child should have a key");var r=e.enterKey(n._baseState.key);if("object"!==typeof t)return e.error("Child expected, but input is not object");var i=n._encode(t[n._baseState.key],e,t);return e.leaveKey(r),i}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(n){var r=this._baseState;return this._getUse(r.args[0],t)._encode(n,e)}),u))}else null!==i.use?o=this._getUse(i.use,n)._encode(t,e):(a=this._encodePrimitive(i.tag,t),s=!0);if(!i.any&&null===i.choice){var l=null!==i.implicit?i.implicit:i.tag,h=null===i.implicit?"universal":"context";null===l?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(l,s,h,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},l.prototype._encodeChoice=function(t,e){var n=this._baseState,r=n.choice[t.type];return r||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(t.value,e)},l.prototype._encodePrimitive=function(t,e){var n=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&n.args)return this._encodeObjid(e,n.reverseArgs[0],n.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,n.args&&n.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},l.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},l.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},function(t,e,n){"use strict";var r=n(6);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,n){var r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,n=e.obj;return e.obj=t,n},i.prototype.error=function(t){var e,n=this._reporterState,r=t instanceof o;if(e=r?t:new o(n.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!n.options.partial)throw e;return r||n.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},r(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(t,e,n){"use strict";function r(t){var e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);var r=t[n];e[r]=n})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=r(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=r(e.tag)},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(609).Buffer}catch(k){}function s(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function l(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"===typeof t)return this._initNumber(t,e,n);if("object"===typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=u(t,e,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(t.length-e)%2===0?e+1:e;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,h=n;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l>>26,c=67108863&u,f=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}n.words[l]=0|c,u=0|h}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?h[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=c[t],d=f[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:h[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,l=new t(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),l[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0===(8191&e)&&(n+=13,e>>>=13),0===(127&e)&&(n+=7,e>>>=7),0===(15&e)&&(n+=4,e>>>=4),0===(3&e)&&(n+=2,e>>>=2),0===(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],E=8191&k,T=k>>>13,A=0|a[6],C=8191&A,O=A>>>13,P=0|a[7],N=8191&P,R=P>>>13,D=0|a[8],I=8191&D,j=D>>>13,L=0|a[9],B=8191&L,F=L>>>13,z=0|s[0],U=8191&z,q=z>>>13,H=0|s[1],W=8191&H,V=H>>>13,Y=0|s[2],Z=8191&Y,G=Y>>>13,K=0|s[3],$=8191&K,Q=K>>>13,X=0|s[4],J=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ht=0|s[8],ct=8191&ht,ft=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(l+(r=Math.imul(c,U))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(f,U)|0))<<13)|0;l=((o=Math.imul(f,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,q))+Math.imul(m,U)|0,o=Math.imul(m,q);var vt=(l+(r=r+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(f,W)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,U),i=(i=Math.imul(v,q))+Math.imul(y,U)|0,o=Math.imul(y,q),r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var yt=(l+(r=r+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(f,Z)|0))<<13)|0;l=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,q))+Math.imul(_,U)|0,o=Math.imul(_,q),r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var bt=(l+(r=r+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,Q)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,q))+Math.imul(S,U)|0,o=Math.imul(S,q),r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,V)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Q)|0;var wt=(l+(r=r+Math.imul(c,J)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(f,J)|0))<<13)|0;l=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,q))+Math.imul(T,U)|0,o=Math.imul(T,q),r=r+Math.imul(x,W)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,V)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(r=r+Math.imul(c,nt)|0)|0)+((8191&(i=(i=i+Math.imul(c,rt)|0)+Math.imul(f,nt)|0))<<13)|0;l=((o=o+Math.imul(f,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(C,U),i=(i=Math.imul(C,q))+Math.imul(O,U)|0,o=Math.imul(O,q),r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(l+(r=r+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,at)|0)+Math.imul(f,ot)|0))<<13)|0;l=((o=o+Math.imul(f,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,U),i=(i=Math.imul(N,q))+Math.imul(R,U)|0,o=Math.imul(R,q),r=r+Math.imul(C,W)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Q)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(l+(r=r+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((o=o+Math.imul(f,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,q))+Math.imul(j,U)|0,o=Math.imul(j,q),r=r+Math.imul(N,W)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,r=r+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var St=(l+(r=r+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(f,ct)|0))<<13)|0;l=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,q))+Math.imul(F,U)|0,o=Math.imul(F,q),r=r+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,V)|0,r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,r=r+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ft)|0;var kt=(l+(r=r+Math.imul(c,pt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((o=o+Math.imul(f,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,W),i=(i=Math.imul(B,V))+Math.imul(F,W)|0,o=Math.imul(F,V),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,G)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(E,nt)|0,i=(i=i+Math.imul(E,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,r=r+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(y,ct)|0,o=o+Math.imul(y,ft)|0;var Et=(l+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,G))+Math.imul(F,Z)|0,o=Math.imul(F,G),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,Q)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,lt)|0,r=r+Math.imul(w,ct)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,ft)|0;var Tt=(l+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,Q))+Math.imul(F,$)|0,o=Math.imul(F,Q),r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,r=r+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,lt)|0,r=r+Math.imul(x,ct)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(S,ct)|0,o=o+Math.imul(S,ft)|0;var At=(l+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,tt))+Math.imul(F,J)|0,o=Math.imul(F,tt),r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,r=r+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,ft)|0;var Ct=(l+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;l=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,lt)|0,r=r+Math.imul(C,ct)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,ft)|0;var Ot=(l+(r=r+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(T,pt)|0))<<13)|0;l=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,lt)|0,r=r+Math.imul(N,ct)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,ft)|0;var Pt=(l+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,lt))+Math.imul(F,ut)|0,o=Math.imul(F,lt),r=r+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ft)|0;var Nt=(l+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(R,pt)|0))<<13)|0;l=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(B,ct),i=(i=Math.imul(B,ft))+Math.imul(F,ct)|0,o=Math.imul(F,ft);var Rt=(l+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(j,pt)|0))<<13)|0;l=((o=o+Math.imul(j,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Dt=(l+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(F,pt)|0))<<13)|0;return l=((o=Math.imul(F,mt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=Et,u[11]=Tt,u[12]=At,u[13]=Ct,u[14]=Ot,u[15]=Pt,u[16]=Nt,u[17]=Rt,u[18]=Dt,0!==l&&(u[19]=l,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==h||l>=i);l--){var c=0|this.words[l];this.words[l]=h<<26-o|c>>>o,h=c&s}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;c--){var f=67108864*(0|r.words[i.length+c])+(0|r.words[i.length+c-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(i,f,c);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,c),r.isZero()||(r.negative^=1);s&&(s.words[c]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++l;for(var h=n.clone(),c=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(l)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,h=1;0===(e.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,f=1;0===(n.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return v[t]=e,e},x.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,l).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var l=e.words[r],h=u-1;h>=0;h--){var c=l>>h&1;i!==n[0]&&(i=this.sqr(i)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===r&&0===h)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,x),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(70)(t))},function(t,e,n){t.exports=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);var i=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var o in i)if(i.hasOwnProperty(o)){if(!("channels"in i[o]))throw new Error("missing channels property: "+o);if(!("labels"in i[o]))throw new Error("missing channel labels property: "+o);if(i[o].labels.length!==i[o].channels)throw new Error("channel and label counts mismatch: "+o);var a=i[o].channels,s=i[o].labels;delete i[o].channels,delete i[o].labels,Object.defineProperty(i[o],"channels",{value:a}),Object.defineProperty(i[o],"labels",{value:s})}i.rgb.hsl=function(t){var e,n,r=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),u=s-a;return s===a?e=0:r===s?e=(i-o)/u:i===s?e=2+(o-r)/u:o===s&&(e=4+(r-i)/u),(e=Math.min(60*e,360))<0&&(e+=360),n=(a+s)/2,[e,100*(s===a?0:n<=.5?u/(s+a):u/(2-s-a)),100*n]},i.rgb.hsv=function(t){var e,n,r,i,o,a=t[0]/255,s=t[1]/255,u=t[2]/255,l=Math.max(a,s,u),h=l-Math.min(a,s,u),c=function(t){return(l-t)/6/h+.5};return 0===h?i=o=0:(o=h/l,e=c(a),n=c(s),r=c(u),a===l?i=r-n:s===l?i=1/3+e-r:u===l&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*l]},i.rgb.hwb=function(t){var e=t[0],n=t[1],r=t[2];return[i.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(n,r))*100,100*(r=1-1/255*Math.max(e,Math.max(n,r)))]},i.rgb.cmyk=function(t){var e,n=t[0]/255,r=t[1]/255,i=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-r,1-i)))/(1-e)||0),100*((1-r-e)/(1-e)||0),100*((1-i-e)/(1-e)||0),100*e]},i.rgb.keyword=function(t){var r=n[t];if(r)return r;var i,o,a,s=1/0;for(var u in e)if(e.hasOwnProperty(u)){var l=e[u],h=(o=t,a=l,Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2));h.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},i.rgb.lab=function(t){var e=i.rgb.xyz(t),n=e[0],r=e[1],o=e[2];return r/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},i.hsl.rgb=function(t){var e,n,r,i,o,a=t[0]/360,s=t[1]/100,u=t[2]/100;if(0===s)return[o=255*u,o,o];e=2*u-(n=u<.5?u*(1+s):u+s-u*s),i=[0,0,0];for(var l=0;l<3;l++)(r=a+1/3*-(l-1))<0&&r++,r>1&&r--,o=6*r<1?e+6*(n-e)*r:2*r<1?n:3*r<2?e+(n-e)*(2/3-r)*6:e,i[l]=255*o;return i},i.hsl.hsv=function(t){var e=t[0],n=t[1]/100,r=t[2]/100,i=n,o=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=o<=1?o:2-o,[e,100*(0===r?2*i/(o+i):2*n/(r+n)),(r+n)/2*100]},i.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),a=255*r*(1-n),s=255*r*(1-n*o),u=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,u,a];case 1:return[s,r,a];case 2:return[a,r,u];case 3:return[a,s,r];case 4:return[u,a,r];case 5:return[r,a,s]}},i.hsv.hsl=function(t){var e,n,r,i=t[0],o=t[1]/100,a=t[2]/100,s=Math.max(a,.01);return r=(2-o)*a,n=o*s,[i,100*(n=(n/=(e=(2-o)*s)<=1?e:2-e)||0),100*(r/=2)]},i.hwb.rgb=function(t){var e,n,r,i,o,a,s,u=t[0]/360,l=t[1]/100,h=t[2]/100,c=l+h;switch(c>1&&(l/=c,h/=c),r=6*u-(e=Math.floor(6*u)),0!==(1&e)&&(r=1-r),i=l+r*((n=1-h)-l),e){default:case 6:case 0:o=n,a=i,s=l;break;case 1:o=i,a=n,s=l;break;case 2:o=l,a=n,s=i;break;case 3:o=l,a=i,s=n;break;case 4:o=i,a=l,s=n;break;case 5:o=n,a=l,s=i}return[255*o,255*a,255*s]},i.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},i.xyz.rgb=function(t){var e,n,r,i=t[0]/100,o=t[1]/100,a=t[2]/100;return n=-.9689*i+1.8758*o+.0415*a,r=.0557*i+-.204*o+1.057*a,e=(e=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},i.xyz.lab=function(t){var e=t[0],n=t[1],r=t[2];return n/=100,r/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},i.lab.xyz=function(t){var e,n,r,i=t[0];e=t[1]/500+(n=(i+16)/116),r=n-t[2]/200;var o=Math.pow(n,3),a=Math.pow(e,3),s=Math.pow(r,3);return n=o>.008856?o:(n-16/116)/7.787,e=a>.008856?a:(e-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[e*=95.047,n*=100,r*=108.883]},i.lab.lch=function(t){var e,n=t[0],r=t[1],i=t[2];return(e=360*Math.atan2(i,r)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(r*r+i*i),e]},i.lch.lab=function(t){var e,n=t[0],r=t[1];return e=t[2]/360*2*Math.PI,[n,r*Math.cos(e),r*Math.sin(e)]},i.rgb.ansi16=function(t){var e=t[0],n=t[1],r=t[2],o=1 in arguments?arguments[1]:i.rgb.hsv(t)[2];if(0===(o=Math.round(o/50)))return 30;var a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===o&&(a+=60),a},i.hsv.ansi16=function(t){return i.rgb.ansi16(i.hsv.rgb(t),t[2])},i.rgb.ansi256=function(t){var e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},i.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},i.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},i.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},i.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},i.rgb.hcg=function(t){var e,n=t[0]/255,r=t[1]/255,i=t[2]/255,o=Math.max(Math.max(n,r),i),a=Math.min(Math.min(n,r),i),s=o-a;return e=s<=0?0:o===n?(r-i)/s%6:o===r?2+(i-n)/s:4+(n-r)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?a/(1-s):0)]},i.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=1,i=0;return(r=n<.5?2*e*n:2*e*(1-n))<1&&(i=(n-.5*r)/(1-r)),[t[0],100*r,100*i]},i.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},i.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100;if(0===n)return[255*r,255*r,255*r];var i,o=[0,0,0],a=e%1*6,s=a%1,u=1-s;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=u,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=u,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=u}return i=(1-n)*r,[255*(n*o[0]+i),255*(n*o[1]+i),255*(n*o[2]+i)]},i.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},i.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},i.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},i.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,r=n-e,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},i.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},i.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},i.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},i.gray.hsl=i.gray.hsv=function(t){return[0,0,t[0]]},i.gray.hwb=function(t){return[0,100,t[0]]},i.gray.cmyk=function(t){return[0,0,0,t[0]]},i.gray.lab=function(t){return[t[0],0,0]},i.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},i.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));function r(t){var e=function(){for(var t={},e=Object.keys(n),r=e.length,i=0;i1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"===typeof n)for(var r=n.length,i=0;i1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(r)}))}));var s=a,u={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},l={getRgba:h,getHsla:c,getRgb:function(t){var e=h(t);return e&&e.slice(0,3)},getHsl:function(t){var e=c(t);return e&&e.slice(0,3)},getHwb:f,getAlpha:function(t){var e=h(t);return e||(e=c(t))||(e=f(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?d(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:d,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);var n=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return"rgb("+n+"%, "+r+"%, "+i+"%)"},percentaString:p,hslString:function(t,e){return e<1||t[3]&&t[3]<1?m(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:m,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return y[t.slice(0,3)]}};function h(t){if(t){var e=[0,0,0],n=1,r=t.match(/^#([a-fA-F0-9]{3,4})$/i),i="";if(r){i=(r=r[1])[3];for(var o=0;on?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,r=void 0===e?.5:e,i=2*r-1,o=this.alpha()-n.alpha(),a=((i*o===-1?i:(i+o)/(1+i*o))+1)/2,s=1-a;return this.rgb(a*this.red()+s*n.red(),a*this.green()+s*n.green(),a*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new w,r=this.values,i=n.values;for(var o in r)r.hasOwnProperty(o)&&(t=r[o],"[object Array]"===(e={}.toString.call(t))?i[o]=t.slice(0):"[object Number]"===e?i[o]=t:console.error("unexpected color value:",t));return n}}).spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},w.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},w.prototype.getValues=function(t){for(var e=this.values,n={},r=0;r=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1===t?1:(n||(n=.3),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1===t?1:(n||(n=.3),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:2===(t/=.5)?1:(n||(n=.45),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),t<1?r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-k.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*k.easeInBounce(2*t):.5*k.easeOutBounce(2*t-1)+.5}},E={effects:k};S.easingEffects=k;var T=Math.PI,A=T/180,C=2*T,O=T/2,P=T/4,N=2*T/3,R={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,r,i,o){if(o){var a=Math.min(o,i/2,r/2),s=e+a,u=n+a,l=e+r-a,h=n+i-a;t.moveTo(e,u),se.left-1e-6&&t.xe.top-1e-6&&t.y0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,r,i=this.animations,o=0;o=n?(U.callback(t.onAnimationComplete,[t],e),e.animating=!1,i.splice(o,1)):++o}},X=U.options.resolve,J=["push","pop","shift","splice","unshift"];function tt(t,e){var n=t._chartjs;if(n){var r=n.listeners,i=r.indexOf(e);-1!==i&&r.splice(i,1),r.length>0||(J.forEach((function(e){delete t[e]})),delete t._chartjs)}}var et=function(t,e){this.initialize(t,e)};U.extend(et.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,r=this.getDataset(),i=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!r.xAxisID||(t.xAxisID=r.xAxisID||i.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!r.yAxisID||(t.yAxisID=r.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&tt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),r=this.getDataset().data||[],i=n.data;for(t=0,e=r.length;tn&&this.insertElements(n,r-n)},insertElements:function(t,e){for(var n=0;ni?(o=i/e.innerRadius,t.arc(a,s,e.innerRadius-i,r+o,n-o,!0)):t.arc(a,s,i,r+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function ot(t,e,n){var r="inner"===e.borderAlign;r?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,r){var i,o=n.endAngle;for(r&&(n.endAngle=n.startAngle+rt,it(t,n),n.endAngle=o,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=rt,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+rt,n.startAngle,!0),i=0;is;)i-=rt;for(;i=a&&i<=s,l=o>=n.innerRadius&&o<=n.outerRadius;return u&&l}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,i={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/rt)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,i.fullCircles){for(i.endAngle=i.startAngle+rt,e.beginPath(),e.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),e.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),e.closePath(),t=0;tt.x&&(e=vt(e,"left","right")):t.basen?n:r,r:u.right||i<0?0:i>e?e:i,b:u.bottom||o<0?0:o>n?n:o,l:u.left||a<0?0:a>e?e:a}}function bt(t,e,n){var r=null===e,i=null===n,o=!(!t||r&&i)&>(t);return o&&(r||e>=o.left&&e<=o.right)&&(i||n>=o.top&&n<=o.bottom)}j._set("global",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:"bottom",borderWidth:0}}});var wt=G.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=gt(t),n=e.right-e.left,r=e.bottom-e.top,i=yt(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b}}}(e),r=n.outer,i=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(r.x,r.y,r.w,r.h),r.w===i.w&&r.h===i.h||(t.save(),t.beginPath(),t.rect(r.x,r.y,r.w,r.h),t.clip(),t.fillStyle=e.borderColor,t.rect(i.x,i.y,i.w,i.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return bt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return mt(n)?bt(n,t,null):bt(n,null,e)},inXRange:function(t){return bt(this._view,t,null)},inYRange:function(t){return bt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return mt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return mt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),_t={},Mt=at,xt=lt,St=dt,kt=wt;_t.Arc=Mt,_t.Line=xt,_t.Point=St,_t.Rectangle=kt;var Et=U._deprecated,Tt=U.valueOrDefault;function At(t,e,n){var r,i,o=n.barThickness,a=e.stackCount,s=e.pixels[t],u=U.isNullOrUndef(o)?function(t,e){var n,r,i,o,a=t._length;for(i=1,o=e.length;i0?Math.min(a,Math.abs(r-n)):a,n=r;return a}(e.scale,e.pixels):-1;return U.isNullOrUndef(o)?(r=u*n.categoryPercentage,i=n.barPercentage):(r=o*a,i=1),{chunk:r/a,ratio:i,start:s-r/2}}j._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),j._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Ct=nt.extend({dataElementType:_t.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;nt.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Et("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Et("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Et("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Et("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Et("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=r.length;e=0&&m.min>=0?m.min:m.max,w=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,_=p.length;if(v||void 0===v&&void 0!==y)for(r=0;r<_&&(i=p[r]).index!==t;++r)i.stack===y&&(o=void 0===(l=c._parseValue(d[i.index].data[e])).start?l.end:l.min>=0&&l.max>=0?l.max:l.min,(m.min<0&&o<0||m.max>=0&&o>0)&&(b+=o));return a=c.getPixelForValue(b),u=(s=c.getPixelForValue(b+w))-a,void 0!==g&&Math.abs(u)=0&&!f||w<0&&f?a-g:a+g),{size:u,base:a,head:s,center:s+u/2}},calculateBarIndexPixels:function(t,e,n,r){var i="flex"===r.barThickness?function(t,e,n){var r,i=e.pixels,o=i[t],a=t>0?i[t-1]:null,s=t=Dt?-It:y<-Dt?It:0)+g,w=Math.cos(y),_=Math.sin(y),M=Math.cos(b),x=Math.sin(b),S=y<=0&&b>=0||b>=It,k=y<=jt&&b>=jt||b>=It+jt,E=y<=-jt&&b>=-jt||b>=Dt+jt,T=y===-Dt||b>=Dt?-1:Math.min(w,w*m,M,M*m),A=E?-1:Math.min(_,_*m,x,x*m),C=S?1:Math.max(w,w*m,M,M*m),O=k?1:Math.max(_,_*m,x,x*m);l=(C-T)/2,h=(O-A)/2,c=-(C+T)/2,f=-(O+A)/2}for(r=0,i=p.length;r0&&!isNaN(t)?It*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,r,i,o,a,s,u,l=0,h=this.chart;if(!t)for(e=0,n=h.data.datasets.length;e(l=s>l?s:l)?u:l);return l},setHoverStyle:function(t){var e=t._model,n=t._options,r=U.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Rt(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Rt(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Rt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n0&&Ut(u[t-1]._model,s)&&(n.controlPointPreviousX=l(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=l(n.controlPointPreviousY,s.top,s.bottom)),t0&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return re(t,e,{intersect:!1})},point:function(t,e){return te(t,Xt(e,t))},nearest:function(t,e,n){var r=Xt(e,t);n.axis=n.axis||"xy";var i=ne(n.axis);return ee(t,r,n.intersect,i)},x:function(t,e,n){var r=Xt(e,t),i=[],o=!1;return Jt(t,(function(t){t.inXRange(r.x)&&i.push(t),t.inRange(r.x,r.y)&&(o=!0)})),n.intersect&&!o&&(i=[]),i},y:function(t,e,n){var r=Xt(e,t),i=[],o=!1;return Jt(t,(function(t){t.inYRange(r.y)&&i.push(t),t.inRange(r.x,r.y)&&(o=!0)})),n.intersect&&!o&&(i=[]),i}}},oe=U.extend;function ae(t,e){return U.where(t,(function(t){return t.pos===e}))}function se(t,e){return t.sort((function(t,n){var r=e?n:t,i=e?t:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight}))}function ue(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function le(t,e,n){var r,i,o=n.box,a=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?o.height:o.width,t[n.pos]+=n.size,o.getPadding){var s=o.getPadding();a.top=Math.max(a.top,s.top),a.left=Math.max(a.left,s.left),a.bottom=Math.max(a.bottom,s.bottom),a.right=Math.max(a.right,s.right)}if(r=e.outerWidth-ue(a,t,"left","right"),i=e.outerHeight-ue(a,t,"top","bottom"),r!==t.w||i!==t.h){t.w=r,t.h=i;var u=n.horizontal?[r,t.w]:[i,t.h];return u[0]!==u[1]&&(!isNaN(u[0])||!isNaN(u[1]))}}function he(t,e){var n=e.maxPadding;function r(t){var r={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){r[t]=Math.max(e[t],n[t])})),r}return r(t?["left","right"]:["top","bottom"])}function ce(t,e,n){var r,i,o,a,s,u,l=[];for(r=0,i=t.length;r div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&de.default||de,ge=["animationstart","webkitAnimationStart"],ve={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ye(t,e){var n=U.getStyle(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var be=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(n){}return t}()&&{passive:!0};function we(t,e,n){t.addEventListener(e,n,be)}function _e(t,e,n){t.removeEventListener(e,n,be)}function Me(t,e,n,r,i){return{type:t,chart:e,native:i||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function xe(t){var e=document.createElement("div");return e.className=t||"",e}function Se(t,e,n){var r=t.$chartjs||(t.$chartjs={}),i=r.resizer=function(t){var e=xe("chartjs-size-monitor"),n=xe("chartjs-size-monitor-expand"),r=xe("chartjs-size-monitor-shrink");n.appendChild(xe()),r.appendChild(xe()),e.appendChild(n),e.appendChild(r),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var i=function(){e._reset(),t()};return we(n,"scroll",i.bind(n,"expand")),we(r,"scroll",i.bind(r,"shrink")),e}(function(t,e){var n=!1,r=[];return function(){r=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,U.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,r)})))}}((function(){if(r.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,o=i?i.clientWidth:0;e(Me("resize",n)),i&&i.clientWidth0){var o=t[0];o.label?n=o.label:o.xLabel?n=o.xLabel:i>0&&o.index-1?t.split("\n"):t}function je(t){var e=t._xScale,n=t._yScale||t._scale,r=t._index,i=t._datasetIndex,o=t._chart.getDatasetMeta(i).controller,a=o._getIndexScale(),s=o._getValueScale();return{xLabel:e?e.getLabelForIndex(r,i):"",yLabel:n?n.getLabelForIndex(r,i):"",label:a?""+a.getLabelForIndex(r,i):"",value:s?""+s.getLabelForIndex(r,i):"",index:r,datasetIndex:i,x:t._model.x,y:t._model.y}}function Le(t){var e=j.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Pe(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Pe(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Pe(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Pe(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Pe(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Pe(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Pe(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Pe(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Pe(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Be(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Fe(t){return De([],Ie(t))}var ze=G.extend({initialize:function(){this._model=Le(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,r=n.beforeTitle.apply(t,arguments),i=n.title.apply(t,arguments),o=n.afterTitle.apply(t,arguments),a=[];return a=De(a,Ie(r)),a=De(a,Ie(i)),a=De(a,Ie(o))},getBeforeBody:function(){return Fe(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,r=n._options.callbacks,i=[];return U.each(t,(function(t){var o={before:[],lines:[],after:[]};De(o.before,Ie(r.beforeLabel.call(n,t,e))),De(o.lines,r.label.call(n,t,e)),De(o.after,Ie(r.afterLabel.call(n,t,e))),i.push(o)})),i},getAfterBody:function(){return Fe(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),r=e.footer.apply(t,arguments),i=e.afterFooter.apply(t,arguments),o=[];return o=De(o,Ie(n)),o=De(o,Ie(r)),o=De(o,Ie(i))},update:function(t){var e,n,r=this,i=r._options,o=r._model,a=r._model=Le(i),s=r._active,u=r._data,l={xAlign:o.xAlign,yAlign:o.yAlign},h={x:o.x,y:o.y},c={width:o.width,height:o.height},f={x:o.caretX,y:o.caretY};if(s.length){a.opacity=1;var d=[],p=[];f=Re[i.position].call(r,s,r._eventPosition);var m=[];for(e=0,n=s.length;er.width&&(i=r.width-e.width),i<0&&(i=0)),"top"===h?o+=c:o-="bottom"===h?e.height+c:e.height/2,"center"===h?"left"===l?i+=c:"right"===l&&(i-=c):"left"===l?i-=f:"right"===l&&(i+=f),{x:i,y:o}}(a,c,l=function(t,e){var n,r,i,o,a,s=t._model,u=t._chart,l=t._chart.chartArea,h="center",c="center";s.yu.height-e.height&&(c="bottom");var f=(l.left+l.right)/2,d=(l.top+l.bottom)/2;"center"===c?(n=function(t){return t<=f},r=function(t){return t>f}):(n=function(t){return t<=e.width/2},r=function(t){return t>=u.width-e.width/2}),i=function(t){return t+e.width+s.caretSize+s.caretPadding>u.width},o=function(t){return t-e.width-s.caretSize-s.caretPadding<0},a=function(t){return t<=d?"top":"bottom"},n(s.x)?(h="left",i(s.x)&&(h="center",c=a(s.y))):r(s.x)&&(h="right",o(s.x)&&(h="center",c=a(s.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:h,yAlign:p.yAlign?p.yAlign:c}}(this,c),r._chart)}else a.opacity=0;return a.xAlign=l.xAlign,a.yAlign=l.yAlign,a.x=h.x,a.y=h.y,a.width=c.width,a.height=c.height,a.caretX=f.x,a.caretY=f.y,r._model=a,t&&i.custom&&i.custom.call(r,a),r},drawCaret:function(t,e){var n=this._chart.ctx,r=this._view,i=this.getCaretPosition(t,e,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(t,e,n){var r,i,o,a,s,u,l=n.caretSize,h=n.cornerRadius,c=n.xAlign,f=n.yAlign,d=t.x,p=t.y,m=e.width,g=e.height;if("center"===f)s=p+g/2,"left"===c?(i=(r=d)-l,o=r,a=s+l,u=s-l):(i=(r=d+m)+l,o=r,a=s-l,u=s+l);else if("left"===c?(r=(i=d+h+l)-l,o=i+l):"right"===c?(r=(i=d+m-h-l)-l,o=i+l):(r=(i=n.caretX)-l,o=i+l),"top"===f)s=(a=p)-l,u=a;else{s=(a=p+g)+l,u=a;var v=o;o=r,r=v}return{x1:r,x2:i,x3:o,y1:a,y2:s,y3:u}},drawTitle:function(t,e,n){var r,i,o,a=e.title,s=a.length;if(s){var u=Ne(e.rtl,e.x,e.width);for(t.x=Be(e,e._titleAlign),n.textAlign=u.textAlign(e._titleAlign),n.textBaseline="middle",r=e.titleFontSize,i=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=U.fontString(r,e._titleFontStyle,e._titleFontFamily),o=0;o0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},r={x:e.x,y:e.y},i=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(r,e,t,n),r.y+=e.yPadding,U.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(r,e,t),this.drawBody(r,e,t),this.drawFooter(r,e,t),U.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,r.mode,r),r.reverse&&n._active.reverse()),(e=!U.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),Ue=Re,qe=ze;qe.positioners=Ue;var He=U.valueOrDefault;function We(){return U.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,r){if("xAxes"===t||"yAxes"===t){var i,o,a,s=n[t].length;for(e[t]||(e[t]=[]),i=0;i=e[t].length&&e[t].push({}),!e[t][i].type||a.type&&a.type!==e[t][i].type?U.merge(e[t][i],[Oe.getScaleDefaults(o),a]):U.merge(e[t][i],a)}else U._merger(t,e,n,r)}})}function Ve(){return U.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,r){var i=e[t]||Object.create(null),o=n[t];"scales"===t?e[t]=We(i,o):"scale"===t?e[t]=U.merge(i,[Oe.getScaleDefaults(o.type),o]):U._merger(t,e,n,r)}})}function Ye(t){var e=t.options;U.each(t.scales,(function(e){pe.removeBox(t,e)})),e=Ve(j.global,j[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ze(t,e,n){var r,i=function(t){return t.id===r};do{r=e+n++}while(U.findIndex(t,i)>=0);return r}function Ge(t){return"top"===t||"bottom"===t}function Ke(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}j._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var $e=function(t,e){return this.construct(t,e),this};U.extend($e.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Ve(j.global,j[t.type],t.options||{}),t}(e);var r=Ae.acquireContext(t,e),i=r&&r.canvas,o=i&&i.height,a=i&&i.width;n.id=U.uid(),n.ctx=r,n.canvas=i,n.config=e,n.width=a,n.height=o,n.aspectRatio=o?a/o:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,$e.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),r&&i?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Ce.notify(t,"beforeInit"),U.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Ce.notify(t,"afterInit"),t},clear:function(){return U.canvas.clear(this),this},stop:function(){return Q.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,r=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(U.getMaximumWidth(r))),a=Math.max(0,Math.floor(i?o/i:U.getMaximumHeight(r)));if((e.width!==o||e.height!==a)&&(r.width=e.width=o,r.height=e.height=a,r.style.width=o+"px",r.style.height=a+"px",U.retinaScale(e,n.devicePixelRatio),!t)){var s={width:o,height:a};Ce.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;U.each(e.xAxes,(function(t,n){t.id||(t.id=Ze(e.xAxes,"x-axis-",n))})),U.each(e.yAxes,(function(t,n){t.id||(t.id=Ze(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},r=[],i=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(r=r.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&r.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),U.each(r,(function(e){var r=e.options,o=r.id,a=He(r.type,e.dtype);Ge(r.position)!==Ge(e.dposition)&&(r.position=e.dposition),i[o]=!0;var s=null;if(o in n&&n[o].type===a)(s=n[o]).options=r,s.ctx=t.ctx,s.chart=t;else{var u=Oe.getScaleConstructor(a);if(!u)return;s=new u({id:o,type:a,options:r,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),U.each(i,(function(t,e){t||delete n[e]})),t.scales=n,Oe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,r=[],i=n.data.datasets;for(t=0,e=i.length;t=0;--n)this.drawDataset(e[n],t);Ce.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Ce.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Ce.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Ce.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Ce.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ie.modes.single(this,t)},getElementsAtEvent:function(t){return ie.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ie.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var r=ie.modes[e];return"function"===typeof r?r(this,t,n):[]},getDatasetAtEvent:function(t){return ie.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&t!==Math.floor(t)&&(r=t-Math.floor(t));var i=U.log10(Math.abs(r)),o="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var a=U.log10(Math.abs(t)),s=Math.floor(a)-Math.floor(i);s=Math.max(Math.min(s,20),0),o=t.toExponential(s)}else{var u=-1*Math.floor(i);u=Math.max(Math.min(u,20),0),o=t.toFixed(u)}else o="0";return o},logarithmic:function(t,e,n){var r=t/Math.pow(10,Math.floor(U.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===e||e===n.length-1?t.toExponential():""}}},nn=U.isArray,rn=U.isNullOrUndef,on=U.valueOrDefault,an=U.valueAtIndexOrDefault;function sn(t,e,n){var r,i=t.getTicks().length,o=Math.min(e,i-1),a=t.getPixelForTick(o),s=t._startPixel,u=t._endPixel;if(!(n&&(r=1===i?Math.max(a-s,u-a):0===e?(t.getPixelForTick(1)-a)/2:(a-t.getPixelForTick(o-1))/2,(a+=ou+1e-6)))return a}function un(t,e,n,r){var i,o,a,s,u,l,h,c,f,d,p,m,g,v=n.length,y=[],b=[],w=[],_=0,M=0;for(i=0;ie){for(n=0;n=f||h<=1||!s.isHorizontal()?s.labelRotation=c:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,r=Math.min(s.maxWidth,s.chart.width-e),e+6>(i=u.offset?s.maxWidth/h:r/(h-1))&&(i=r/(h-(u.offset?.5:1)),o=s.maxHeight-ln(u.gridLines)-l.padding-hn(u.scaleLabel),a=Math.sqrt(e*e+n*n),d=U.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/i,1)),Math.asin(Math.min(o/a,1))-Math.asin(n/a))),d=Math.max(c,Math.min(f,d))),s.labelRotation=d)},afterCalculateTickRotation:function(){U.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){U.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,r=t.options,i=r.ticks,o=r.scaleLabel,a=r.gridLines,s=t._isVisible(),u="bottom"===r.position,l=t.isHorizontal();if(l?e.width=t.maxWidth:s&&(e.width=ln(a)+hn(o)),l?s&&(e.height=ln(a)+hn(o)):e.height=t.maxHeight,i.display&&s){var h=fn(i),c=t._getLabelSizes(),f=c.first,d=c.last,p=c.widest,m=c.highest,g=.4*h.minor.lineHeight,v=i.padding;if(l){var y=0!==t.labelRotation,b=U.toRadians(t.labelRotation),w=Math.cos(b),_=Math.sin(b),M=_*p.width+w*(m.height-(y?m.offset:0))+(y?0:g);e.height=Math.min(t.maxHeight,e.height+M+v);var x,S,k=t.getPixelForTick(0)-t.left,E=t.right-t.getPixelForTick(t.getTicks().length-1);y?(x=u?w*f.width+_*f.offset:_*(f.height-f.offset),S=u?_*(d.height-d.offset):w*d.width+_*d.offset):(x=f.width/2,S=d.width/2),t.paddingLeft=Math.max((x-k)*t.width/(t.width-k),0)+3,t.paddingRight=Math.max((S-E)*t.width/(t.width-E),0)+3}else{var T=i.mirror?0:p.width+v+g;e.width=Math.min(t.maxWidth,e.width+T),t.paddingTop=f.height/2,t.paddingBottom=d.height/2}}t.handleMargins(),l?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){U.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(rn(t))return NaN;if(("number"===typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,r,i=this;for(i.ticks=t.map((function(t){return t.value})),i.beforeTickToLabelConversion(),e=i.convertTicksToLabels(t)||i.ticks,i.afterTickToLabelConversion(),n=0,r=t.length;nn-1?null:this.getPixelForDecimal(t*r+(e?r/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,r,i,o=this.options.ticks,a=this._length,s=o.maxTicksLimit||a/this._tickSize()+1,u=o.major.enabled?function(t){var e,n,r=[];for(e=0,n=t.length;es)return function(t,e,n){var r,i,o=0,a=e[0];for(n=Math.ceil(n),r=0;rl)return o;return Math.max(l,1)}(u,t,0,s),l>0){for(e=0,n=l-1;e1?(c-h)/(l-1):null,pn(t,r,U.isNullOrUndef(i)?0:h-i,h),pn(t,r,c,U.isNullOrUndef(i)?t.length:c+i),dn(t)}return pn(t,r),dn(t)},_tickSize:function(){var t=this.options.ticks,e=U.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),i=this._getLabelSizes(),o=t.autoSkipPadding||0,a=i?i.widest.width+o:0,s=i?i.highest.height+o:0;return this.isHorizontal()?s*n>a*r?a/n:s/r:s*r=0&&(a=t),void 0!==o&&(t=n.indexOf(o))>=0&&(s=t),e.minIndex=a,e.maxIndex=s,e.min=n[a],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;gn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var r,i,o,a=this;return vn(e)||vn(n)||(t=a.chart.data.datasets[n].data[e]),vn(t)||(r=a.isHorizontal()?t.x:t.y),(void 0!==r||void 0!==t&&isNaN(e))&&(i=a._getLabels(),t=U.valueOrDefault(r,t),e=-1!==(o=i.indexOf(t))?o:e,isNaN(e)&&(e=t)),a.getPixelForDecimal((e-a._startValue)/a._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),bn={position:"bottom"};yn._defaults=bn;var wn=U.noop,_n=U.isNullOrUndef,Mn=gn.extend({getRightValue:function(t){return"string"===typeof t?+t:gn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=U.sign(t.min),r=U.sign(t.max);n<0&&r<0?t.max=0:n>0&&r>0&&(t.min=0)}var i=void 0!==e.min||void 0!==e.suggestedMin,o=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),i!==o&&t.min>=t.max&&(i?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,r=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),r=r||11),r&&(t=Math.min(r,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:wn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:U.valueOrDefault(e.fixedStepSize,e.stepSize)},i=t.ticks=function(t,e){var n,r,i,o,a=[],s=t.stepSize,u=s||1,l=t.maxTicks-1,h=t.min,c=t.max,f=t.precision,d=e.min,p=e.max,m=U.niceNum((p-d)/l/u)*u;if(m<1e-14&&_n(h)&&_n(c))return[d,p];(o=Math.ceil(p/m)-Math.floor(d/m))>l&&(m=U.niceNum(o*m/l/u)*u),s||_n(f)?n=Math.pow(10,U._decimalPlaces(m)):(n=Math.pow(10,f),m=Math.ceil(m*n)/n),r=Math.floor(d/m)*m,i=Math.ceil(p/m)*m,s&&(!_n(h)&&U.almostWhole(h/m,m/1e3)&&(r=h),!_n(c)&&U.almostWhole(c/m,m/1e3)&&(i=c)),o=(i-r)/m,o=U.almostEquals(o,Math.round(o),m/1e3)?Math.round(o):Math.ceil(o),r=Math.round(r*n)/n,i=Math.round(i*n)/n,a.push(_n(h)?r:h);for(var g=1;ge.length-1?null:this.getPixelForValue(e[t])}}),Tn=xn;En._defaults=Tn;var An=U.valueOrDefault,Cn=U.math.log10,On={position:"left",ticks:{callback:en.formatters.logarithmic}};function Pn(t,e){return U.isFinite(t)&&t>=0?t:e}var Nn=gn.extend({determineDataLimits:function(){var t,e,n,r,i,o,a=this,s=a.options,u=a.chart,l=u.data.datasets,h=a.isHorizontal();function c(t){return h?t.xAxisID===a.id:t.yAxisID===a.id}a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,a.minNotZero=Number.POSITIVE_INFINITY;var f=s.stacked;if(void 0===f)for(t=0;t0){var e=U.min(t),n=U.max(t);a.min=Math.min(a.min,e),a.max=Math.max(a.max,n)}}))}else for(t=0;t0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Cn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),r={min:Pn(e.min),max:Pn(e.max)},i=t.ticks=function(t,e){var n,r,i=[],o=An(t.min,Math.pow(10,Math.floor(Cn(e.min)))),a=Math.floor(Cn(e.max)),s=Math.ceil(e.max/Math.pow(10,a));0===o?(n=Math.floor(Cn(e.minNotZero)),r=Math.floor(e.minNotZero/Math.pow(10,n)),i.push(o),o=r*Math.pow(10,n)):(n=Math.floor(Cn(o)),r=Math.floor(o/Math.pow(10,n)));var u=n<0?Math.pow(10,Math.abs(n)):1;do{i.push(o),10===++r&&(r=1,u=++n>=0?1:u),o=Math.round(r*Math.pow(10,n)*u)/u}while(ne.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Cn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;gn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=An(t.options.ticks.fontSize,j.global.defaultFontSize)/t._length),t._startValue=Cn(e),t._valueOffset=n,t._valueRange=(Cn(t.max)-Cn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Cn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Rn=On;Nn._defaults=Rn;var Dn=U.valueOrDefault,In=U.valueAtIndexOrDefault,jn=U.options.resolve,Ln={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:en.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Bn(t){var e=t.ticks;return e.display&&t.display?Dn(e.fontSize,j.global.defaultFontSize)+2*e.backdropPaddingY:0}function Fn(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:ti?{start:e-n,end:e}:{start:e,end:e+n}}function zn(t){return 0===t||180===t?"center":t<180?"left":"right"}function Un(t,e,n,r){var i,o,a=n.y+r/2;if(U.isArray(e))for(i=0,o=e.length;i270||t<90)&&(n.y-=e.h)}function Hn(t){return U.isNumber(t)?t:0}var Wn=Mn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Bn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;U.each(e.data.datasets,(function(i,o){if(e.isDatasetVisible(o)){var a=e.getDatasetMeta(o);U.each(i.data,(function(e,i){var o=+t.getRightValue(e);isNaN(o)||a.data[i].hidden||(n=Math.min(o,n),r=Math.max(o,r))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=r===Number.NEGATIVE_INFINITY?0:r,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Bn(this.options))},convertTicksToLabels:function(){var t=this;Mn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=U.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,r,i=U.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},a={};t.ctx.font=i.string,t._pointLabelSizes=[];var s,u,l,h=t.chart.data.labels.length;for(e=0;eo.r&&(o.r=d.end,a.r=c),p.starto.b&&(o.b=p.end,a.b=c)}t.setReductions(t.drawingArea,o,a)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var r=this,i=e.l/Math.sin(n.l),o=Math.max(e.r-r.width,0)/Math.sin(n.r),a=-e.t/Math.cos(n.t),s=-Math.max(e.b-(r.height-r.paddingTop),0)/Math.cos(n.b);i=Hn(i),o=Hn(o),a=Hn(a),s=Hn(s),r.drawingArea=Math.min(Math.floor(t-(i+o)/2),Math.floor(t-(a+s)/2)),r.setCenterPoint(i,o,a,s)},setCenterPoint:function(t,e,n,r){var i=this,o=i.width-e-i.drawingArea,a=t+i.drawingArea,s=n+i.drawingArea,u=i.height-i.paddingTop-r-i.drawingArea;i.xCenter=Math.floor((a+o)/2+i.left),i.yCenter=Math.floor((s+u)/2+i.top+i.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(U.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,r=this,i=r.ctx,o=r.options,a=o.gridLines,s=o.angleLines,u=Dn(s.lineWidth,a.lineWidth),l=Dn(s.color,a.color);if(o.pointLabels.display&&function(t){var e=t.ctx,n=t.options,r=n.pointLabels,i=Bn(n),o=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),a=U.options._parseFont(r);e.save(),e.font=a.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var u=0===s?i/2:0,l=t.getPointPosition(s,o+u+5),h=In(r.fontColor,s,j.global.defaultFontColor);e.fillStyle=h;var c=t.getIndexAngle(s),f=U.toDegrees(c);e.textAlign=zn(f),qn(f,t._pointLabelSizes[s],l),Un(e,t.pointLabels[s],l,a.lineHeight)}e.restore()}(r),a.display&&U.each(r.ticks,(function(t,n){0!==n&&(e=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(t,e,n,r){var i,o=t.ctx,a=e.circular,s=t.chart.data.labels.length,u=In(e.color,r-1),l=In(e.lineWidth,r-1);if((a||s)&&u&&l){if(o.save(),o.strokeStyle=u,o.lineWidth=l,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),a)o.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{i=t.getPointPosition(0,n),o.moveTo(i.x,i.y);for(var h=1;h=0;t--)e=r.getDistanceFromCenterForValue(o.ticks.reverse?r.min:r.max),n=r.getPointPosition(t,e),i.beginPath(),i.moveTo(r.xCenter,r.yCenter),i.lineTo(n.x,n.y),i.stroke();i.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var r,i,o=t.getIndexAngle(0),a=U.options._parseFont(n),s=Dn(n.fontColor,j.global.defaultFontColor);e.save(),e.font=a.string,e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",U.each(t.ticks,(function(o,u){(0!==u||n.reverse)&&(r=t.getDistanceFromCenterForValue(t.ticksAsNumbers[u]),n.showLabelBackdrop&&(i=e.measureText(o).width,e.fillStyle=n.backdropColor,e.fillRect(-i/2-n.backdropPaddingX,-r-a.size/2-n.backdropPaddingY,i+2*n.backdropPaddingX,a.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(o,0,-r))})),e.restore()}},_drawTitle:U.noop}),Vn=Ln;Wn._defaults=Vn;var Yn=U._deprecated,Zn=U.options.resolve,Gn=U.valueOrDefault,Kn=Number.MIN_SAFE_INTEGER||-9007199254740991,$n=Number.MAX_SAFE_INTEGER||9007199254740991,Qn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Xn=Object.keys(Qn);function Jn(t,e){return t-e}function tr(t){return U.valueOrDefault(t.time.min,t.ticks.min)}function er(t){return U.valueOrDefault(t.time.max,t.ticks.max)}function nr(t,e,n,r){var i=function(t,e,n){for(var r,i,o,a=0,s=t.length-1;a>=0&&a<=s;){if(i=t[(r=a+s>>1)-1]||null,o=t[r],!i)return{lo:null,hi:o};if(o[e]n))return{lo:i,hi:o};s=r-1}}return{lo:o,hi:null}}(t,e,n),o=i.lo?i.hi?i.lo:t[t.length-2]:t[0],a=i.lo?i.hi?i.hi:t[t.length-1]:t[1],s=a[e]-o[e],u=s?(n-o[e])/s:0,l=(a[r]-o[r])*u;return o[r]+l}function rr(t,e){var n=t._adapter,r=t.options.time,i=r.parser,o=i||r.format,a=e;return"function"===typeof i&&(a=i(a)),U.isFinite(a)||(a="string"===typeof o?n.parse(a,o):n.parse(a)),null!==a?+a:(i||"function"!==typeof o||(a=o(e),U.isFinite(a)||(a=n.parse(a))),a)}function ir(t,e){if(U.isNullOrUndef(e))return null;var n=t.options.time,r=rr(t,t.getRightValue(e));return null===r||n.round&&(r=+t._adapter.startOf(r,n.round)),r}function or(t,e,n,r){var i,o,a,s=Xn.length;for(i=Xn.indexOf(t);i=0&&(e[o].major=!0);return e}(t,o,a,n):o}var sr=gn.extend({initialize:function(){this.mergeTicksOptions(),gn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),r=t._adapter=new tn._date(e.adapters.date);return Yn("time scale",n.format,"time.format","time.parser"),Yn("time scale",n.min,"time.min","ticks.min"),Yn("time scale",n.max,"time.max","ticks.max"),U.mergeIf(n.displayFormats,r.formats()),gn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),gn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,r,i,o,a,s=this,u=s.chart,l=s._adapter,h=s.options,c=h.time.unit||"day",f=$n,d=Kn,p=[],m=[],g=[],v=s._getLabels();for(t=0,n=v.length;t1?function(t){var e,n,r,i={},o=[];for(e=0,n=t.length;e1e5*l)throw e+" and "+n+" are too far apart with stepSize of "+l+" "+u;for(i=c;i=i&&n<=o&&h.push(n);return r.min=i,r.max=o,r._unit=u.unit||(s.autoSkip?or(u.minUnit,r.min,r.max,c):function(t,e,n,r,i){var o,a;for(o=Xn.length-1;o>=Xn.indexOf(n);o--)if(a=Xn[o],Qn[a].common&&t._adapter.diff(i,r,a)>=e-1)return a;return Xn[n?Xn.indexOf(n):0]}(r,h.length,u.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?function(t){for(var e=Xn.indexOf(t)+1,n=Xn.length;ee&&s=0&&t0?s:1}}),ur={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};sr._defaults=ur;var lr={category:yn,linear:En,logarithmic:Nn,radialLinear:Wn,time:sr},hr={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};tn._date.override("function"===typeof t?{_id:"moment",formats:function(){return hr},parse:function(e,n){return"string"===typeof e&&"string"===typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,r){return t(e).add(n,r).valueOf()},diff:function(e,n,r){return t(e).diff(t(n),r)},startOf:function(e,n,r){return e=t(e),"isoWeek"===n?e.isoWeekday(r).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),j._set("global",{plugins:{filler:{propagate:!0}}});var cr={dataset:function(t){var e=t.fill,n=t.chart,r=n.getDatasetMeta(e),i=r&&n.isDatasetVisible(e)&&r.dataset._children||[],o=i.length||0;return o?function(t,e){return e=n)&&r;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function dr(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,r,i,o,a=t.el._scale,s=a.options,u=a.chart.data.labels.length,l=t.fill,h=[];if(!u)return null;for(e=s.ticks.reverse?a.max:a.min,n=s.ticks.reverse?a.min:a.max,r=a.getPointPositionForValue(0,e),i=0;i0;--o)U.canvas.lineTo(t,n[o],n[o-1],!0);else for(a=n[0].cx,s=n[0].cy,u=Math.sqrt(Math.pow(n[0].x-a,2)+Math.pow(n[0].y-s,2)),o=i-1;o>0;--o)t.arc(a,s,u,n[o].angle,n[o-1].angle,!0)}}function yr(t,e,n,r,i,o){var a,s,u,l,h,c,f,d,p=e.length,m=r.spanGaps,g=[],v=[],y=0,b=0;for(t.beginPath(),a=0,s=p;a=0;--n)(e=u[n].$filler)&&e.visible&&(i=(r=e.el)._view,o=r._children||[],a=e.mapper,s=i.backgroundColor||j.global.defaultColor,a&&s&&o.length&&(U.canvas.clipArea(l,t.chartArea),yr(l,o,a,i,s,r._loop),U.canvas.unclipArea(l)))}},wr=U.rtl.getRtlAdapter,_r=U.noop,Mr=U.valueOrDefault;function xr(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}j._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,r=this.chart,i=r.getDatasetMeta(n);i.hidden=null===i.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},r=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var i=n.controller.getStyle(r?0:void 0);return{text:e[n.index].label,fillStyle:i.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,r,i=document.createElement("ul"),o=t.data.datasets;for(i.setAttribute("class",t.id+"-legend"),e=0,n=o.length;eu.width)&&(c+=a+n.padding,h[h.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:r,height:a},h[h.length-1]+=r+n.padding})),u.height+=c}else{var f=n.padding,d=t.columnWidths=[],p=t.columnHeights=[],m=n.padding,g=0,v=0;U.each(t.legendItems,(function(t,e){var r=xr(n,a)+a/2+i.measureText(t.text).width;e>0&&v+a+2*f>u.height&&(m+=g+n.padding,d.push(g),p.push(v),g=0,v=0),g=Math.max(g,r),v+=a+f,s[e]={left:0,top:0,width:r,height:a}})),m+=g,d.push(g),p.push(v),u.width+=m}t.width=u.width,t.height=u.height}else t.width=u.width=t.height=u.height=0},afterFit:_r,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,r=j.global,i=r.defaultColor,o=r.elements.line,a=t.height,s=t.columnHeights,u=t.width,l=t.lineWidths;if(e.display){var h,c=wr(e.rtl,t.left,t.minSize.width),f=t.ctx,d=Mr(n.fontColor,r.defaultFontColor),p=U.options._parseFont(n),m=p.size;f.textAlign=c.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=d,f.fillStyle=d,f.font=p.string;var g=xr(n,m),v=t.legendHitBoxes,y=function(t,r){switch(e.align){case"start":return n.padding;case"end":return t-r;default:return(t-r+n.padding)/2}},b=t.isHorizontal();h=b?{x:t.left+y(u,l[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+y(a,s[0]),line:0},U.rtl.overrideTextDirection(t.ctx,e.textDirection);var w=m+n.padding;U.each(t.legendItems,(function(e,r){var d=f.measureText(e.text).width,p=g+m/2+d,_=h.x,M=h.y;c.setWidth(t.minSize.width),b?r>0&&_+p+n.padding>t.left+t.minSize.width&&(M=h.y+=w,h.line++,_=h.x=t.left+y(u,l[h.line])):r>0&&M+w>t.top+t.minSize.height&&(_=h.x=_+t.columnWidths[h.line]+n.padding,h.line++,M=h.y=t.top+y(a,s[h.line]));var x=c.x(_);!function(t,e,r){if(!(isNaN(g)||g<=0)){f.save();var a=Mr(r.lineWidth,o.borderWidth);if(f.fillStyle=Mr(r.fillStyle,i),f.lineCap=Mr(r.lineCap,o.borderCapStyle),f.lineDashOffset=Mr(r.lineDashOffset,o.borderDashOffset),f.lineJoin=Mr(r.lineJoin,o.borderJoinStyle),f.lineWidth=a,f.strokeStyle=Mr(r.strokeStyle,i),f.setLineDash&&f.setLineDash(Mr(r.lineDash,o.borderDash)),n&&n.usePointStyle){var s=g*Math.SQRT2/2,u=c.xPlus(t,g/2),l=e+m/2;U.canvas.drawPoint(f,r.pointStyle,s,u,l,r.rotation)}else f.fillRect(c.leftForLtr(t,g),e,g,m),0!==a&&f.strokeRect(c.leftForLtr(t,g),e,g,m);f.restore()}}(x,M,e),v[r].left=c.leftForLtr(x,v[r].width),v[r].top=M,function(t,e,n,r){var i=m/2,o=c.xPlus(t,g+i),a=e+i;f.fillText(n.text,o,a),n.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(o,a),f.lineTo(c.xPlus(o,r),a),f.stroke())}(x,M,e,d),b?h.x+=p+n.padding:h.y+=w})),U.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,r,i,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(i=o.legendHitBoxes,n=0;n=(r=i[n]).left&&t<=r.left+r.width&&e>=r.top&&e<=r.top+r.height)return o.legendItems[n];return null},handleEvent:function(t){var e,n=this,r=n.options,i="mouseup"===t.type?"click":t.type;if("mousemove"===i){if(!r.onHover&&!r.onLeave)return}else{if("click"!==i)return;if(!r.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===i?e&&r.onClick&&r.onClick.call(n,t.native,e):(r.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),r.onHover&&e&&r.onHover.call(n,t.native,e))}});function kr(t,e){var n=new Sr({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.legend=n}var Er={id:"legend",_element:Sr,beforeInit:function(t){var e=t.options.legend;e&&kr(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(U.mergeIf(e,j.global.legend),n?(pe.configure(t,n,e),n.options=e):kr(t,e)):n&&(pe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Tr=U.noop;j._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ar=G.extend({initialize:function(t){U.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Tr,update:function(t,e,n){var r=this;return r.beforeUpdate(),r.maxWidth=t,r.maxHeight=e,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:Tr,beforeSetDimensions:Tr,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Tr,beforeBuildLabels:Tr,buildLabels:Tr,afterBuildLabels:Tr,beforeFit:Tr,fit:function(){var t,e=this,n=e.options,r=e.minSize={},i=e.isHorizontal();n.display?(t=(U.isArray(n.text)?n.text.length:1)*U.options._parseFont(n).lineHeight+2*n.padding,e.width=r.width=i?e.maxWidth:t,e.height=r.height=i?t:e.maxHeight):e.width=r.width=e.height=r.height=0},afterFit:Tr,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var r,i,o,a=U.options._parseFont(n),s=a.lineHeight,u=s/2+n.padding,l=0,h=t.top,c=t.left,f=t.bottom,d=t.right;e.fillStyle=U.valueOrDefault(n.fontColor,j.global.defaultFontColor),e.font=a.string,t.isHorizontal()?(i=c+(d-c)/2,o=h+u,r=d-c):(i="left"===n.position?c+u:d-u,o=h+(f-h)/2,r=f-h,l=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(i,o),e.rotate(l),e.textAlign="center",e.textBaseline="middle";var p=n.text;if(U.isArray(p))for(var m=0,g=0;g=0;r--){var i=t[r];if(e(i))return i}},U.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},U.almostEquals=function(t,e,n){return Math.abs(t-e)=t},U.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},U.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},U.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},U.toRadians=function(t){return t*(Math.PI/180)},U.toDegrees=function(t){return t*(180/Math.PI)},U._decimalPlaces=function(t){if(U.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},U.getAngleFromPoint=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r),o=Math.atan2(r,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:i}},U.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},U.aliasPixel=function(t){return t%2===0?0:.5},U._alignPixel=function(t,e,n){var r=t.currentDevicePixelRatio,i=n/2;return Math.round((e-i)*r)/r+i},U.splineCurve=function(t,e,n,r){var i=t.skip?e:t,o=e,a=n.skip?e:n,s=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),u=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),l=s/(s+u),h=u/(s+u),c=r*(l=isNaN(l)?0:l),f=r*(h=isNaN(h)?0:h);return{previous:{x:o.x-c*(a.x-i.x),y:o.y-c*(a.y-i.y)},next:{x:o.x+f*(a.x-i.x),y:o.y+f*(a.y-i.y)}}},U.EPSILON=Number.EPSILON||1e-14,U.splineCurveMonotone=function(t){var e,n,r,i,o,a,s,u,l,h=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),c=h.length;for(e=0;e0?h[e-1]:null,(i=e0?h[e-1]:null,i=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},U.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},U.niceNum=function(t,e){var n=Math.floor(U.log10(t)),r=t/Math.pow(10,n);return(e?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},U.requestAnimFrame="undefined"===typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},U.getRelativePosition=function(t,e){var n,r,i=t.originalEvent||t,o=t.target||t.srcElement,a=o.getBoundingClientRect(),s=i.touches;s&&s.length>0?(n=s[0].clientX,r=s[0].clientY):(n=i.clientX,r=i.clientY);var u=parseFloat(U.getStyle(o,"padding-left")),l=parseFloat(U.getStyle(o,"padding-top")),h=parseFloat(U.getStyle(o,"padding-right")),c=parseFloat(U.getStyle(o,"padding-bottom")),f=a.right-a.left-u-h,d=a.bottom-a.top-l-c;return{x:n=Math.round((n-a.left-u)/f*o.width/e.currentDevicePixelRatio),y:r=Math.round((r-a.top-l)/d*o.height/e.currentDevicePixelRatio)}},U.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},U.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},U._calculatePadding=function(t,e,n){return(e=U.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},U._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},U.getMaximumWidth=function(t){var e=U._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,r=n-U._calculatePadding(e,"padding-left",n)-U._calculatePadding(e,"padding-right",n),i=U.getConstraintWidth(t);return isNaN(i)?r:Math.min(r,i)},U.getMaximumHeight=function(t){var e=U._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,r=n-U._calculatePadding(e,"padding-top",n)-U._calculatePadding(e,"padding-bottom",n),i=U.getConstraintHeight(t);return isNaN(i)?r:Math.min(r,i)},U.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},U.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!==typeof window&&window.devicePixelRatio||1;if(1!==n){var r=t.canvas,i=t.height,o=t.width;r.height=i*n,r.width=o*n,t.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=i+"px",r.style.width=o+"px")}},U.fontString=function(t,e,n){return e+" "+t+"px "+n},U.longestText=function(t,e,n,r){var i=(r=r||{}).data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},o=r.garbageCollect=[],r.font=e),t.font=e;var a,s,u,l,h,c=0,f=n.length;for(a=0;an.length){for(a=0;ar&&(r=o),r},U.numberOfLabelLines=function(t){var e=1;return U.each(t,(function(t){U.isArray(t)&&t.length>e&&(e=t.length)})),e},U.color=_?function(t){return t instanceof CanvasGradient&&(t=j.global.defaultColor),_(t)}:function(t){return console.error("Color.js not found!"),t},U.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:U.color(t).saturate(.5).darken(.1).rgbString()}}(),Qe._adapters=tn,Qe.Animation=$,Qe.animationService=Q,Qe.controllers=Qt,Qe.DatasetController=nt,Qe.defaults=j,Qe.Element=G,Qe.elements=_t,Qe.Interaction=ie,Qe.layouts=pe,Qe.platform=Ae,Qe.plugins=Ce,Qe.Scale=gn,Qe.scaleService=Oe,Qe.Ticks=en,Qe.Tooltip=qe,Qe.helpers.each(lr,(function(t,e){Qe.scaleService.registerScaleType(e,t,t._defaults)})),Or)Or.hasOwnProperty(Dr)&&Qe.plugins.register(Or[Dr]);Qe.platform.initialize();var Ir=Qe;return"undefined"!==typeof window&&(window.Chart=Qe),Qe.Chart=Qe,Qe.Legend=Or.legend._element,Qe.Title=Or.title._element,Qe.pluginService=Qe.plugins,Qe.PluginBase=Qe.Element.extend({}),Qe.canvasHelpers=Qe.helpers.canvas,Qe.layoutService=Qe.layouts,Qe.LinearScaleBase=Mn,Qe.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){Qe[t]=function(e,n){return new Qe(e,Qe.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Ir}(function(){try{return n(633)}catch(t){}}())},,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(127);var i=n(156);function o(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Object(i.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(t,e,n){"use strict";!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}}(),t.exports=n(510)},,,,,,,,function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}n.d(e,"a",(function(){return r}))},,,,,function(t,e,n){var r=n(90);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(19),i=n(5),o=n(170);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(19),i=n(5);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,e,n){var r=n(29),i=n(173),o=n(43),a=n(30);t.exports=function(t,e,n){for(var s=i(e),u=a.f,l=o.f,h=0;hl;)i(r,n=e[l++])&&(~a(h,n)||u(h,n));return h}},function(t,e,n){var r=n(44),i=n(78),o=n(34),a=function(t){return function(e,n,a){var s,u=r(e),l=o(u),h=i(a,l);if(t&&n!=n){for(;l>h;)if((s=u[h++])!=s)return!0}else for(;l>h;h++)if((t||h in u)&&u[h]===n)return t||h||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(19),i=n(243),o=n(30),a=n(13),s=n(44),u=n(111);e.f=r&&!i?Object.defineProperties:function(t,e){a(t);for(var n,r=s(e),i=u(e),l=i.length,h=0;l>h;)o.f(t,n=i[h++],r[n]);return t}},function(t,e,n){var r=n(17);e.f=r},function(t,e,n){var r=n(23),i=n(49),o=n(17),a=n(77);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,s=o("toPrimitive");e&&!e[s]&&a(e,s,(function(t){return r(n,this)}),{arity:1})}},function(t,e,n){var r=n(90);t.exports=r&&!!Symbol.for&&!!Symbol.keyFor},function(t,e,n){var r=n(2),i=n(389);r({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},function(t,e,n){"use strict";var r=n(2),i=n(19),o=n(143),a=n(58),s=n(21),u=n(30);i&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(t,e){u.f(s(this),t,{get:a(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(108).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},function(t,e,n){"use strict";var r=n(2),i=n(19),o=n(143),a=n(58),s=n(21),u=n(30);i&&r({target:"Object",proto:!0,forced:o},{__defineSetter__:function(t,e){u.f(s(this),t,{set:a(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(2),i=n(256).entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},function(t,e,n){var r=n(19),i=n(8),o=n(111),a=n(44),s=i(n(132).f),u=i([].push),l=function(t){return function(e){for(var n,i=a(e),l=o(i),h=l.length,c=0,f=[];h>c;)n=l[c++],r&&!s(i,n)||u(f,t?[n,i[n]]:i[n]);return f}};t.exports={entries:l(!0),values:l(!1)}},function(t,e,n){var r=n(2),i=n(116),o=n(5),a=n(20),s=n(181).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(t){return u&&a(t)?u(s(t)):t}})},function(t,e,n){var r=n(2),i=n(390),o=n(66);r({target:"Object",stat:!0},{fromEntries:function(t){var e={};return i(t,(function(t,n){o(e,t,n)}),{AS_ENTRIES:!0}),e}})},function(t,e,n){var r=n(17),i=n(117),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},function(t,e,n){var r=n(23),i=n(58),o=n(13),a=n(91),s=n(184),u=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(i(n))return o(r(n,t));throw u(a(t)+" is not iterable")}},function(t,e,n){var r=n(23),i=n(13),o=n(76);t.exports=function(t,e,n){var a,s;i(t);try{if(!(a=o(t,"return"))){if("throw"===e)throw n;return n}a=r(a,t)}catch(u){s=!0,a=u}if("throw"===e)throw n;if(s)throw a;return i(a),n}},function(t,e,n){var r=n(2),i=n(5),o=n(44),a=n(43).f,s=n(19),u=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},function(t,e,n){var r=n(2),i=n(19),o=n(173),a=n(44),s=n(43),u=n(66);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),i=s.f,l=o(r),h={},c=0;l.length>c;)void 0!==(n=i(r,e=l[c++]))&&u(h,e,n);return h}})},function(t,e,n){var r=n(2),i=n(5),o=n(176).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(t,e,n){var r=n(2),i=n(5),o=n(21),a=n(67),s=n(185);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},function(t,e,n){n(2)({target:"Object",stat:!0},{is:n(267)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,n){var r=n(2),i=n(182);r({target:"Object",stat:!0,forced:Object.isExtensible!==i},{isExtensible:i})},function(t,e,n){var r=n(2),i=n(5),o=n(20),a=n(57),s=n(183),u=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){u(1)}))||s},{isFrozen:function(t){return!o(t)||(!(!s||"ArrayBuffer"!=a(t))||!!u&&u(t))}})},function(t,e,n){var r=n(2),i=n(5),o=n(20),a=n(57),s=n(183),u=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){u(1)}))||s},{isSealed:function(t){return!o(t)||(!(!s||"ArrayBuffer"!=a(t))||!!u&&u(t))}})},function(t,e,n){var r=n(2),i=n(21),o=n(111);r({target:"Object",stat:!0,forced:n(5)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},function(t,e,n){"use strict";var r=n(2),i=n(19),o=n(143),a=n(21),s=n(75),u=n(67),l=n(43).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(t){var e,n=a(this),r=s(t);do{if(e=l(n,r))return e.get}while(n=u(n))}})},function(t,e,n){"use strict";var r=n(2),i=n(19),o=n(143),a=n(21),s=n(75),u=n(67),l=n(43).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(t){var e,n=a(this),r=s(t);do{if(e=l(n,r))return e.set}while(n=u(n))}})},function(t,e,n){var r=n(2),i=n(20),o=n(181).onFreeze,a=n(116),s=n(5),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{preventExtensions:function(t){return u&&i(t)?u(o(t)):t}})},function(t,e,n){var r=n(2),i=n(20),o=n(181).onFreeze,a=n(116),s=n(5),u=Object.seal;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{seal:function(t){return u&&i(t)?u(o(t)):t}})},function(t,e,n){n(2)({target:"Object",stat:!0},{setPrototypeOf:n(186)})},function(t,e,n){var r=n(24),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},function(t,e,n){var r=n(2),i=n(256).values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){var r=n(170)("span").classList,i=r&&r.constructor&&r.constructor.prototype;t.exports=i===Object.prototype?void 0:i},function(t,e,n){"use strict";var r=n(44),i=n(68),o=n(117),a=n(109),s=n(30).f,u=n(282),l=n(64),h=n(19),c=a.set,f=a.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");var d=o.Arguments=o.Array;if(i("keys"),i("values"),i("entries"),!l&&h&&"values"!==d.name)try{s(d,"name",{value:"values"})}catch(p){}},function(t,e,n){"use strict";var r=n(2),i=n(23),o=n(64),a=n(171),s=n(24),u=n(392),l=n(67),h=n(186),c=n(95),f=n(93),d=n(77),p=n(17),m=n(117),g=n(283),v=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,w=g.BUGGY_SAFARI_ITERATORS,_=p("iterator"),M=function(){return this};t.exports=function(t,e,n,a,p,g,x){u(n,e,a);var S,k,E,T=function(t){if(t===p&&N)return N;if(!w&&t in O)return O[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},A=e+" Iterator",C=!1,O=t.prototype,P=O[_]||O["@@iterator"]||p&&O[p],N=!w&&P||T(p),R="Array"==e&&O.entries||P;if(R&&(S=l(R.call(new t)))!==Object.prototype&&S.next&&(o||l(S)===b||(h?h(S,b):s(S[_])||d(S,_,M)),c(S,A,!0,!0),o&&(m[A]=M)),v&&"values"==p&&P&&"values"!==P.name&&(!o&&y?f(O,"name","values"):(C=!0,N=function(){return i(P,this)})),p)if(k={values:T("values"),keys:g?N:T("keys"),entries:T("entries")},x)for(E in k)(w||C||!(E in O))&&d(O,E,k[E]);else r({target:e,proto:!0,forced:w||C},k);return o&&!x||O[_]===N||d(O,_,N,{name:p}),m[e]=N,k}},function(t,e,n){"use strict";var r,i,o,a=n(5),s=n(24),u=n(94),l=n(67),h=n(77),c=n(17),f=n(64),d=c("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=l(l(o)))!==Object.prototype&&(r=i):p=!0),void 0==r||a((function(){var t={};return r[d].call(t)!==t}))?r={}:f&&(r=u(r)),s(r[d])||h(r,d,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(t,e,n){"use strict";var r=n(2),i=n(5),o=n(113),a=n(20),s=n(21),u=n(34),l=n(190),h=n(66),c=n(112),f=n(118),d=n(17),p=n(136),m=d("isConcatSpreadable"),g=p>=51||!i((function(){var t=[];return t[m]=!1,t.concat()[0]!==t})),v=f("concat"),y=function(t){if(!a(t))return!1;var e=t[m];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,arity:1,forced:!g||!v},{concat:function(t){var e,n,r,i,o,a=s(this),f=c(a,0),d=0;for(e=-1,r=arguments.length;e0&&r(d)?p=t(e,n,d,i(d),p,h-1)-1:(o(p+1),e[p]=d),p++),m++;return p}},function(t,e,n){var r=n(2),i=n(403);r({target:"Array",stat:!0,forced:!n(405)((function(t){Array.from(t)}))},{from:i})},function(t,e,n){var r=n(20),i=Math.floor;t.exports=Number.isInteger||function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(114),i=n(91),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a constructor")}},function(t,e,n){var r=n(29);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},function(t,e,n){"use strict";var r=n(2),i=n(145);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(t,e,n){var r=n(5),i=n(18).RegExp,o=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=o||r((function(){return!i("a","y").sticky})),s=o||r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:o}},function(t,e,n){var r=n(20),i=n(57),o=n(17)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){"use strict";var r=n(194).charAt,i=n(22),o=n(109),a=n(282),s=o.set,u=o.getterFor("String Iterator");a(String,"String",(function(t){s(this,{type:"String Iterator",string:i(t),index:0})}),(function(){var t,e=u(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(8),i=n(79),o=n(22),a=n(193),s=n(38),u=r(a),l=r("".slice),h=Math.ceil,c=function(t){return function(e,n,r){var a,c,f=o(s(e)),d=i(n),p=f.length,m=void 0===r?" ":o(r);return d<=p||""==m?f:((c=u(m,h((a=d-p)/m.length))).length>a&&(c=l(c,0,a)),t?f+c:c+f)}};t.exports={start:c(!1),end:c(!0)}},function(t,e,n){var r=n(108);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},function(t,e,n){"use strict";var r=n(119).end,i=n(198);t.exports=i("trimEnd")?function(){return r(this)}:"".trimEnd},function(t,e,n){"use strict";var r=n(119).start,i=n(198);t.exports=i("trimStart")?function(){return r(this)}:"".trimStart},function(t,e,n){"use strict";var r=n(504);function i(){}var o=null,a={};function s(t){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof t)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,t!==i&&d(t,this)}function u(t,e){for(;3===t._V;)t=t._W;if(s._Y&&s._Y(t),0===t._V)return 0===t._U?(t._U=1,void(t._X=e)):1===t._U?(t._U=2,void(t._X=[t._X,e])):void t._X.push(e);!function(t,e){r((function(){var n=1===t._V?e.onFulfilled:e.onRejected;if(null!==n){var r=function(t,e){try{return t(e)}catch(n){return o=n,a}}(n,t._W);r===a?h(e.promise,o):l(e.promise,r)}else 1===t._V?l(e.promise,t._W):h(e.promise,t._W)}))}(t,e)}function l(t,e){if(e===t)return h(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"===typeof e||"function"===typeof e)){var n=function(t){try{return t.then}catch(e){return o=e,a}}(e);if(n===a)return h(t,o);if(n===t.then&&e instanceof s)return t._V=3,t._W=e,void c(t);if("function"===typeof n)return void d(n.bind(e),t)}t._V=1,t._W=e,c(t)}function h(t,e){t._V=2,t._W=e,s._Z&&s._Z(t,e),c(t)}function c(t){if(1===t._U&&(u(t,t._X),t._X=null),2===t._U){for(var e=0;e=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(509),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(25))},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";var r=n(516).Buffer,i=n(517).Transform;function o(t){i.call(this),this._block=r.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(6)(o,i),o.prototype._transform=function(t,e,n){var r=null;try{this.update(t,e)}catch(i){r=i}n(r)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(n){e=n}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!r.isBuffer(t)&&"string"!==typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=r.from(t,e));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,n){"use strict";(function(e,r){var i;t.exports=k,k.ReadableState=S;n(80).EventEmitter;var o=function(t,e){return t.listeners(e).length},a=n(303),s=n(28).Buffer,u=e.Uint8Array||function(){};var l,h=n(518);l=h&&h.debuglog?h.debuglog("stream"):function(){};var c,f,d,p=n(519),m=n(304),g=n(305).getHighWaterMark,v=n(98).codes,y=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,w=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(6)(k,a);var M=m.errorOrDestroy,x=["error","close","destroy","pause","resume"];function S(t,e,r){i=i||n(99),t=t||{},"boolean"!==typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=n(81).StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function k(t){if(i=i||n(99),!(this instanceof k))return new k(t);var e=this instanceof i;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function E(t,e,n,r,i){l("readableAddChunk",e);var o,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(l("onEofChunk"),e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?C(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,O(t)))}(t,a);else if(i||(o=function(t,e){var n;r=e,s.isBuffer(r)||r instanceof u||"string"===typeof e||void 0===e||t.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],e));var r;return n}(a,e)),o)M(t,o);else if(a.objectMode||e&&e.length>0)if("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r)a.endEmitted?M(t,new _):T(t,a,e,!0);else if(a.ended)M(t,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?T(t,a,e,!1):P(t,a)):T(t,a,e,!1)}else r||(a.reading=!1,P(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;l("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(O,t))}function O(t){var e=t._readableState;l("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,j(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(N,t,e))}function N(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function D(t){l("readable nexttick read 0"),t.read(0)}function I(t,e){l("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),j(t),e.flowing&&!e.reading&&t.read(0)}function j(t){var e=t._readableState;for(l("flow",e.flowing);e.flowing&&null!==t.read(););}function L(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function B(t){var e=t._readableState;l("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(F,e,t))}function F(t,e){if(l("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function z(t,e){for(var n=0,r=t.length;n=e.highWaterMark:e.length>0)||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):C(this),null;if(0===(t=A(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,i=e.needReadable;return l("need readable",i),(0===e.length||e.length-t0?L(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(t){M(this,new w("_read()"))},k.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,l("pipe count=%d opts=%j",i.pipesCount,e);var a=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:g;function s(e,r){l("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",h),t.removeListener("error",d),t.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",f),c=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function u(){l("onend"),t.end()}i.endEmitted?r.nextTick(a):n.once("end",a),t.on("unpipe",s);var h=function(t){return function(){var e=t._readableState;l("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,j(t))}}(n);t.on("drain",h);var c=!1;function f(e){l("ondata");var r=t.write(e);l("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==z(i.pipes,t))&&!c&&(l("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(e){l("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&M(t,e)}function p(){t.removeListener("finish",m),g()}function m(){l("onfinish"),t.removeListener("close",p),g()}function g(){l("unpipe"),n.unpipe(t)}return n.on("data",f),function(t,e,n){if("function"===typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",n),i.flowing||(l("pipe resume"),n.resume()),t},k.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,l("on readable",i.length,i.reading),i.length?C(this):i.reading||r.nextTick(D,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(t,e){var n=a.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(R,this),n},k.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(R,this),e},k.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(I,t,e))}(this,t)),t.paused=!1,this},k.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(l("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(l("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause())))})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(t,e,n){n(new m("_write()"))},k.prototype._writev=null,k.prototype.end=function(t,e,n){var i=this._writableState;return"function"===typeof t?(n=t,t=null,e=null):"function"===typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),k.prototype.destroy=c.destroy,k.prototype._undestroy=c.undestroy,k.prototype._destroy=function(t,e){e(t)}}).call(this,n(25),n(26))},function(t,e,n){"use strict";t.exports=h;var r=n(98).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(99);function l(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function f(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)n[v]=t.readInt32BE(4*v);for(;v<64;++v)n[v]=0|(((e=n[v-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+n[v-7]+d(n[v-15])+n[v-16];for(var y=0;y<64;++y){var b=g+f(u)+l(u,p,m)+a[y]+n[y]|0,w=c(r)+h(r,i,o)|0;g=m,m=p,p=u,u=s+b|0,s=o,o=i,i=r,r=b+w|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,n){var r=n(6),i=n(100),o=n(9).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function l(t,e,n){return n^t&(e^n)}function h(t,e,n){return t&e|n&(t|e)}function c(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function f(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function v(t,e){return t>>>0>>0?1:0}r(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,y=0|this._gh,b=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,x=0|this._dl,S=0|this._el,k=0|this._fl,E=0|this._gl,T=0|this._hl,A=0;A<32;A+=2)e[A]=t.readInt32BE(4*A),e[A+1]=t.readInt32BE(4*A+4);for(;A<160;A+=2){var C=e[A-30],O=e[A-30+1],P=d(C,O),N=p(O,C),R=m(C=e[A-4],O=e[A-4+1]),D=g(O,C),I=e[A-14],j=e[A-14+1],L=e[A-32],B=e[A-32+1],F=N+j|0,z=P+I+v(F,N)|0;z=(z=z+R+v(F=F+D|0,D)|0)+L+v(F=F+B|0,B)|0,e[A]=z,e[A+1]=F}for(var U=0;U<160;U+=2){z=e[U],F=e[U+1];var q=h(n,r,i),H=h(w,_,M),W=c(n,w),V=c(w,n),Y=f(s,S),Z=f(S,s),G=a[U],K=a[U+1],$=l(s,u,y),Q=l(S,k,E),X=T+Z|0,J=b+Y+v(X,T)|0;J=(J=(J=J+$+v(X=X+Q|0,Q)|0)+G+v(X=X+K|0,K)|0)+z+v(X=X+F|0,F)|0;var tt=V+H|0,et=W+q+v(tt,V)|0;b=y,T=E,y=u,E=k,u=s,k=S,s=o+J+v(S=x+X|0,x)|0,o=i,x=M,i=r,M=_,r=n,_=w,n=J+et+v(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+x|0,this._el=this._el+S|0,this._fl=this._fl+k|0,this._gl=this._gl+E|0,this._hl=this._hl+T|0,this._ah=this._ah+n+v(this._al,w)|0,this._bh=this._bh+r+v(this._bl,_)|0,this._ch=this._ch+i+v(this._cl,M)|0,this._dh=this._dh+o+v(this._dl,x)|0,this._eh=this._eh+s+v(this._el,S)|0,this._fh=this._fh+u+v(this._fl,k)|0,this._gh=this._gh+y+v(this._gl,E)|0,this._hh=this._hh+b+v(this._hl,T)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,n){"use strict";(function(e,r){var i=n(148);t.exports=b;var o,a=n(300);b.ReadableState=y;n(80).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=n(311),l=n(9).Buffer,h=e.Uint8Array||function(){};var c=Object.create(n(121));c.inherits=n(6);var f=n(530),d=void 0;d=f&&f.debuglog?f.debuglog("stream"):function(){};var p,m=n(531),g=n(312);c.inherits(b,u);var v=["error","close","destroy","pause","resume"];function y(t,e){t=t||{};var r=e instanceof(o=o||n(82));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=n(81).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||n(82),!(this instanceof b))return new b(t);this._readableState=new y(t,this),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,n,r,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,x(t)}(t,a)):(i||(o=function(t,e){var n;r=e,l.isBuffer(r)||r instanceof h||"string"===typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=function(t){return l.from(t)}(e)),r?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?_(t,a,e,!1):k(t,a)):_(t,a,e,!1))):r||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function x(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(S,t):S(t))}function S(t){d("emit readable"),t.emit("readable"),C(t)}function k(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(E,t,e))}function E(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=l.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),0===(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(N,e,t))}function N(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):x(this),null;if(0===(t=M(t,e))&&e.ended)return 0===e.length&&P(this),null;var r,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&P(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?h:b;function l(e,r){d("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),t.removeListener("close",v),t.removeListener("finish",y),t.removeListener("drain",c),t.removeListener("error",g),t.removeListener("unpipe",l),n.removeListener("end",h),n.removeListener("end",b),n.removeListener("data",m),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function h(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",l);var c=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,C(t))}}(n);t.on("drain",c);var f=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==R(o.pipes,t))&&!f&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function g(e){d("onerror",e),b(),t.removeListener("error",g),0===s(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",y),b()}function y(){d("onfinish"),t.removeListener("close",v),b()}function b(){d("unpipe"),n.unpipe(t)}return n.on("data",m),function(t,e,n){if("function"===typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",g),t.once("close",v),t.once("finish",y),t.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;on)?e=("rmd160"===t?new u:l(t)).update(e).digest():e.lengthn||e!==e)throw new TypeError("Bad key length")}},function(t,e,n){(function(e,n){var r;if(e.process&&e.process.browser)r="utf-8";else if(e.process&&e.process.version){r=parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";t.exports=r}).call(this,n(25),n(26))},function(t,e,n){var r=n(315),i=n(202),o=n(203),a=n(9).Buffer,s=n(318),u=n(319),l=n(321),h=a.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(t,e,n){var s=function(t){function e(e){return o(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?r:e}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=s(e):e.length>>0},e.writeUInt32BE=function(t,e,n){t[0+n]=e>>>24,t[1+n]=e>>>16&255,t[2+n]=e>>>8&255,t[3+n]=255&e},e.ip=function(t,e,n,r){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}n[r+0]=i>>>0,n[r+1]=o>>>0},e.rip=function(t,e,n,r){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},e.pc1=function(t,e,n,r){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u>>r[u]&1;for(u=s;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},e.expand=function(t,e,n){var r=0,i=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[n+0]=r>>>0,e[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(e>>>18-6*r&63)]}return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,n=0;n>>o[n]&1;return e>>>0},e.padSplit=function(t,e,n){for(var r=t.toString(2);r.length>>1];n=o.r28shl(n,s),i=o.r28shl(i,s),o.pc2(n,i,t.keys,a)}},u.prototype._update=function(t,e,n,r){var i=this._desState,a=o.readUInt32BE(t,e),s=o.readUInt32BE(t,e+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(n,a,r),o.writeUInt32BE(n,s,r+4)},u.prototype._pad=function(t,e){for(var n=t.length-e,r=e;r>>0,a=f}o.rip(s,a,r,i)},u.prototype._decrypt=function(t,e,n,r,i){for(var a=n,s=e,u=t.keys.length-2;u>=0;u-=2){var l=t.keys[u],h=t.keys[u+1];o.expand(a,t.tmp,0),l^=t.tmp[0],h^=t.tmp[1];var c=o.substitute(l,h),f=a;a=(s^o.permute(c))>>>0,s=f}o.rip(a,s,r,i)}},function(t,e,n){var r=n(122),i=n(9).Buffer,o=n(325);function a(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var n=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*n)]);for(var s=0;st;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(u),e.cmp(u)){if(!e.cmp(l))for(;n.mod(h).cmp(c);)n.iadd(d)}else for(;n.mod(o).cmp(f);)n.iadd(d);if(g(p=n.shrn(1))&&g(n)&&v(p)&&v(n)&&a.test(p)&&a.test(n))return n}}},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(557).Buffer}catch(k){}function s(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function l(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"===typeof t)return this._initNumber(t,e,n);if("object"===typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=u(t,e,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(t.length-e)%2===0?e+1:e;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,h=n;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l>>26,c=67108863&u,f=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}n.words[l]=0|c,u=0|h}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?h[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=c[t],d=f[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:h[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,l=new t(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),l[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0===(8191&e)&&(n+=13,e>>>=13),0===(127&e)&&(n+=7,e>>>=7),0===(15&e)&&(n+=4,e>>>=4),0===(3&e)&&(n+=2,e>>>=2),0===(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],E=8191&k,T=k>>>13,A=0|a[6],C=8191&A,O=A>>>13,P=0|a[7],N=8191&P,R=P>>>13,D=0|a[8],I=8191&D,j=D>>>13,L=0|a[9],B=8191&L,F=L>>>13,z=0|s[0],U=8191&z,q=z>>>13,H=0|s[1],W=8191&H,V=H>>>13,Y=0|s[2],Z=8191&Y,G=Y>>>13,K=0|s[3],$=8191&K,Q=K>>>13,X=0|s[4],J=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ht=0|s[8],ct=8191&ht,ft=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(l+(r=Math.imul(c,U))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(f,U)|0))<<13)|0;l=((o=Math.imul(f,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,q))+Math.imul(m,U)|0,o=Math.imul(m,q);var vt=(l+(r=r+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(f,W)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,U),i=(i=Math.imul(v,q))+Math.imul(y,U)|0,o=Math.imul(y,q),r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var yt=(l+(r=r+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(f,Z)|0))<<13)|0;l=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,q))+Math.imul(_,U)|0,o=Math.imul(_,q),r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var bt=(l+(r=r+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,Q)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,q))+Math.imul(S,U)|0,o=Math.imul(S,q),r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,V)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Q)|0;var wt=(l+(r=r+Math.imul(c,J)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(f,J)|0))<<13)|0;l=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,q))+Math.imul(T,U)|0,o=Math.imul(T,q),r=r+Math.imul(x,W)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,V)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(r=r+Math.imul(c,nt)|0)|0)+((8191&(i=(i=i+Math.imul(c,rt)|0)+Math.imul(f,nt)|0))<<13)|0;l=((o=o+Math.imul(f,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(C,U),i=(i=Math.imul(C,q))+Math.imul(O,U)|0,o=Math.imul(O,q),r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(l+(r=r+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,at)|0)+Math.imul(f,ot)|0))<<13)|0;l=((o=o+Math.imul(f,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,U),i=(i=Math.imul(N,q))+Math.imul(R,U)|0,o=Math.imul(R,q),r=r+Math.imul(C,W)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Q)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(l+(r=r+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((o=o+Math.imul(f,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,q))+Math.imul(j,U)|0,o=Math.imul(j,q),r=r+Math.imul(N,W)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,r=r+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var St=(l+(r=r+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(f,ct)|0))<<13)|0;l=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,q))+Math.imul(F,U)|0,o=Math.imul(F,q),r=r+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,V)|0,r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,r=r+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ft)|0;var kt=(l+(r=r+Math.imul(c,pt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((o=o+Math.imul(f,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,W),i=(i=Math.imul(B,V))+Math.imul(F,W)|0,o=Math.imul(F,V),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,G)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(E,nt)|0,i=(i=i+Math.imul(E,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,r=r+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(y,ct)|0,o=o+Math.imul(y,ft)|0;var Et=(l+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,G))+Math.imul(F,Z)|0,o=Math.imul(F,G),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,Q)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,lt)|0,r=r+Math.imul(w,ct)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,ft)|0;var Tt=(l+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,Q))+Math.imul(F,$)|0,o=Math.imul(F,Q),r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,r=r+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,lt)|0,r=r+Math.imul(x,ct)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(S,ct)|0,o=o+Math.imul(S,ft)|0;var At=(l+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,tt))+Math.imul(F,J)|0,o=Math.imul(F,tt),r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,r=r+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,ft)|0;var Ct=(l+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;l=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,lt)|0,r=r+Math.imul(C,ct)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,ft)|0;var Ot=(l+(r=r+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(T,pt)|0))<<13)|0;l=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,lt)|0,r=r+Math.imul(N,ct)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,ft)|0;var Pt=(l+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,lt))+Math.imul(F,ut)|0,o=Math.imul(F,lt),r=r+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ft)|0;var Nt=(l+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(R,pt)|0))<<13)|0;l=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(B,ct),i=(i=Math.imul(B,ft))+Math.imul(F,ct)|0,o=Math.imul(F,ft);var Rt=(l+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(j,pt)|0))<<13)|0;l=((o=o+Math.imul(j,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Dt=(l+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(F,pt)|0))<<13)|0;return l=((o=Math.imul(F,mt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=Et,u[11]=Tt,u[12]=At,u[13]=Ct,u[14]=Ot,u[15]=Pt,u[16]=Nt,u[17]=Rt,u[18]=Dt,0!==l&&(u[19]=l,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==h||l>=i);l--){var c=0|this.words[l];this.words[l]=h<<26-o|c>>>o,h=c&s}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;c--){var f=67108864*(0|r.words[i.length+c])+(0|r.words[i.length+c-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(i,f,c);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,c),r.isZero()||(r.negative^=1);s&&(s.words[c]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++l;for(var h=n.clone(),c=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(l)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,h=1;0===(e.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,f=1;0===(n.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return v[t]=e,e},x.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,l).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var l=e.words[r],h=u-1;h>=0;h--){var c=l>>h&1;i!==n[0]&&(i=this.sqr(i)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===r&&0===h)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,x),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(70)(t))},function(t,e,n){var r=n(558),i=n(209);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),n=Math.ceil(e/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var n=e.sub(t);return t.add(this._randbelow(n))},o.prototype.test=function(t,e,n){var i=t.bitLength(),o=r.mont(t),a=new r(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var l=t.shrn(u),h=s.toRed(o);e>0;e--){var c=this._randrange(new r(2),s);n&&n(c);var f=c.toRed(o).redPow(l);if(0!==f.cmp(a)&&0!==f.cmp(h)){for(var d=1;d0;e--){var h=this._randrange(new r(2),a),c=t.gcd(h);if(0!==c.cmpn(1))return c;var f=h.toRed(i).redPow(u);if(0!==f.cmp(o)&&0!==f.cmp(l)){for(var d=1;d0)if("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r)a.endEmitted?M(t,new _):T(t,a,e,!0);else if(a.ended)M(t,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?T(t,a,e,!1):P(t,a)):T(t,a,e,!1)}else r||(a.reading=!1,P(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;l("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(O,t))}function O(t){var e=t._readableState;l("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,j(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(N,t,e))}function N(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function D(t){l("readable nexttick read 0"),t.read(0)}function I(t,e){l("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),j(t),e.flowing&&!e.reading&&t.read(0)}function j(t){var e=t._readableState;for(l("flow",e.flowing);e.flowing&&null!==t.read(););}function L(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function B(t){var e=t._readableState;l("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(F,e,t))}function F(t,e){if(l("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function z(t,e){for(var n=0,r=t.length;n=e.highWaterMark:e.length>0)||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):C(this),null;if(0===(t=A(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,i=e.needReadable;return l("need readable",i),(0===e.length||e.length-t0?L(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(t){M(this,new w("_read()"))},k.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,l("pipe count=%d opts=%j",i.pipesCount,e);var a=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:g;function s(e,r){l("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",h),t.removeListener("error",d),t.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",f),c=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function u(){l("onend"),t.end()}i.endEmitted?r.nextTick(a):n.once("end",a),t.on("unpipe",s);var h=function(t){return function(){var e=t._readableState;l("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,j(t))}}(n);t.on("drain",h);var c=!1;function f(e){l("ondata");var r=t.write(e);l("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==z(i.pipes,t))&&!c&&(l("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(e){l("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&M(t,e)}function p(){t.removeListener("finish",m),g()}function m(){l("onfinish"),t.removeListener("close",p),g()}function g(){l("unpipe"),n.unpipe(t)}return n.on("data",f),function(t,e,n){if("function"===typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",n),i.flowing||(l("pipe resume"),n.resume()),t},k.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,l("on readable",i.length,i.reading),i.length?C(this):i.reading||r.nextTick(D,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(t,e){var n=a.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(R,this),n},k.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(R,this),e},k.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(I,t,e))}(this,t)),t.paused=!1,this},k.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(l("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(l("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause())))})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(t,e,n){n(new m("_write()"))},k.prototype._writev=null,k.prototype.end=function(t,e,n){var i=this._writableState;return"function"===typeof t?(n=t,t=null,e=null):"function"===typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),k.prototype.destroy=c.destroy,k.prototype._undestroy=c.undestroy,k.prototype._destroy=function(t,e){e(t)}}).call(this,n(25),n(26))},function(t,e,n){"use strict";t.exports=h;var r=n(101).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(102);function l(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>8,a=255&i;o?n.push(o,a):n.push(a)}return n},r.zero2=i,r.toHex=o,r.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,n){"use strict";var r=e;r.base=n(151),r.short=n(576),r.mont=n(577),r.edwards=n(578)},function(t,e,n){"use strict";var r=n(53).rotr32;function i(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function a(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?a(e,n,r):2===t?o(e,n,r):void 0},e.ch32=i,e.maj32=o,e.p32=a,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},function(t,e,n){"use strict";var r=n(53),i=n(123),o=n(340),a=n(50),s=r.sum32,u=r.sum32_4,l=r.sum32_5,h=o.ch32,c=o.maj32,f=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(y,g),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function l(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"===typeof t)return this._initNumber(t,e,n);if("object"===typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=u(t,e,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(t.length-e)%2===0?e+1:e;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,h=n;h1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l>>26,c=67108863&u,f=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;h+=(a=(i=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&a}n.words[l]=0|c,u=0|h}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?h[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=c[t],d=f[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:h[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,l=new t(o),h=this.clone();if(u){for(s=0;!h.isZero();s++)a=h.andln(255),h.iushrn(8),l[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0===(8191&e)&&(n+=13,e>>>=13),0===(127&e)&&(n+=7,e>>>=7),0===(15&e)&&(n+=4,e>>>=4),0===(3&e)&&(n+=2,e>>>=2),0===(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,M=0|a[4],x=8191&M,S=M>>>13,k=0|a[5],E=8191&k,T=k>>>13,A=0|a[6],C=8191&A,O=A>>>13,P=0|a[7],N=8191&P,R=P>>>13,D=0|a[8],I=8191&D,j=D>>>13,L=0|a[9],B=8191&L,F=L>>>13,z=0|s[0],U=8191&z,q=z>>>13,H=0|s[1],W=8191&H,V=H>>>13,Y=0|s[2],Z=8191&Y,G=Y>>>13,K=0|s[3],$=8191&K,Q=K>>>13,X=0|s[4],J=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ht=0|s[8],ct=8191&ht,ft=ht>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(l+(r=Math.imul(c,U))|0)+((8191&(i=(i=Math.imul(c,q))+Math.imul(f,U)|0))<<13)|0;l=((o=Math.imul(f,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,q))+Math.imul(m,U)|0,o=Math.imul(m,q);var vt=(l+(r=r+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,V)|0)+Math.imul(f,W)|0))<<13)|0;l=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,U),i=(i=Math.imul(v,q))+Math.imul(y,U)|0,o=Math.imul(y,q),r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0;var yt=(l+(r=r+Math.imul(c,Z)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(f,Z)|0))<<13)|0;l=((o=o+Math.imul(f,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,q))+Math.imul(_,U)|0,o=Math.imul(_,q),r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var bt=(l+(r=r+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,Q)|0)+Math.imul(f,$)|0))<<13)|0;l=((o=o+Math.imul(f,Q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,q))+Math.imul(S,U)|0,o=Math.imul(S,q),r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,V)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Q)|0;var wt=(l+(r=r+Math.imul(c,J)|0)|0)+((8191&(i=(i=i+Math.imul(c,tt)|0)+Math.imul(f,J)|0))<<13)|0;l=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(E,U),i=(i=Math.imul(E,q))+Math.imul(T,U)|0,o=Math.imul(T,q),r=r+Math.imul(x,W)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,V)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(r=r+Math.imul(c,nt)|0)|0)+((8191&(i=(i=i+Math.imul(c,rt)|0)+Math.imul(f,nt)|0))<<13)|0;l=((o=o+Math.imul(f,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(C,U),i=(i=Math.imul(C,q))+Math.imul(O,U)|0,o=Math.imul(O,q),r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,Q)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(l+(r=r+Math.imul(c,ot)|0)|0)+((8191&(i=(i=i+Math.imul(c,at)|0)+Math.imul(f,ot)|0))<<13)|0;l=((o=o+Math.imul(f,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(N,U),i=(i=Math.imul(N,q))+Math.imul(R,U)|0,o=Math.imul(R,q),r=r+Math.imul(C,W)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Q)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(l+(r=r+Math.imul(c,ut)|0)|0)+((8191&(i=(i=i+Math.imul(c,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((o=o+Math.imul(f,lt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,q))+Math.imul(j,U)|0,o=Math.imul(j,q),r=r+Math.imul(N,W)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,r=r+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var St=(l+(r=r+Math.imul(c,ct)|0)|0)+((8191&(i=(i=i+Math.imul(c,ft)|0)+Math.imul(f,ct)|0))<<13)|0;l=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(B,U),i=(i=Math.imul(B,q))+Math.imul(F,U)|0,o=Math.imul(F,q),r=r+Math.imul(I,W)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,V)|0,r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(S,nt)|0,o=o+Math.imul(S,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,r=r+Math.imul(p,ct)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ft)|0;var kt=(l+(r=r+Math.imul(c,pt)|0)|0)+((8191&(i=(i=i+Math.imul(c,mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((o=o+Math.imul(f,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,W),i=(i=Math.imul(B,V))+Math.imul(F,W)|0,o=Math.imul(F,V),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,G)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,Q)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(E,nt)|0,i=(i=i+Math.imul(E,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,r=r+Math.imul(v,ct)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(y,ct)|0,o=o+Math.imul(y,ft)|0;var Et=(l+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,G))+Math.imul(F,Z)|0,o=Math.imul(F,G),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,Q)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,lt)|0,r=r+Math.imul(w,ct)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ct)|0,o=o+Math.imul(_,ft)|0;var Tt=(l+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,Q))+Math.imul(F,$)|0,o=Math.imul(F,Q),r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,r=r+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,lt)|0,r=r+Math.imul(x,ct)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(S,ct)|0,o=o+Math.imul(S,ft)|0;var At=(l+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,tt))+Math.imul(F,J)|0,o=Math.imul(F,tt),r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,r=r+Math.imul(E,ct)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(T,ct)|0,o=o+Math.imul(T,ft)|0;var Ct=(l+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;l=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,lt)|0,r=r+Math.imul(C,ct)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(O,ct)|0,o=o+Math.imul(O,ft)|0;var Ot=(l+(r=r+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(T,pt)|0))<<13)|0;l=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,lt)|0,r=r+Math.imul(N,ct)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(R,ct)|0,o=o+Math.imul(R,ft)|0;var Pt=(l+(r=r+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,lt))+Math.imul(F,ut)|0,o=Math.imul(F,lt),r=r+Math.imul(I,ct)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ft)|0;var Nt=(l+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(R,pt)|0))<<13)|0;l=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(B,ct),i=(i=Math.imul(B,ft))+Math.imul(F,ct)|0,o=Math.imul(F,ft);var Rt=(l+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(j,pt)|0))<<13)|0;l=((o=o+Math.imul(j,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Dt=(l+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(F,pt)|0))<<13)|0;return l=((o=Math.imul(F,mt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=xt,u[8]=St,u[9]=kt,u[10]=Et,u[11]=Tt,u[12]=At,u[13]=Ct,u[14]=Ot,u[15]=Pt,u[16]=Nt,u[17]=Rt,u[18]=Dt,0!==l&&(u[19]=l,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==h||l>=i);l--){var c=0|this.words[l];this.words[l]=h<<26-o|c>>>o,h=c&s}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"===typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"===typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;c--){var f=67108864*(0|r.words[i.length+c])+(0|r.words[i.length+c-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(i,f,c);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,c),r.isZero()||(r.negative^=1);s&&(s.words[c]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++l;for(var h=n.clone(),c=e.clone();!e.isZero();){for(var f=0,d=1;0===(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(h),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(h),u.isub(c)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(l)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,h=1;0===(e.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var c=0,f=1;0===(n.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(n.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return v[t]=e,e},x.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,l).cmp(u);)h.redIAdd(u);for(var c=this.pow(h,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var l=e.words[r],h=u-1;h>=0;h--){var c=l>>h&1;i!==n[0]&&(i=this.sqr(i)),0!==c||0!==a?(a<<=1,a|=c,(4===++s||0===r&&0===h)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,x),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(70)(t))},function(t,e,n){"use strict";var r=e;r.der=n(346),r.pem=n(596)},function(t,e,n){"use strict";var r=n(6),i=n(217).Buffer,o=n(218),a=n(220);function s(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.call(this,"der",t)}function l(t){return t<10?"0"+t:t}t.exports=s,s.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},r(u,o),u.prototype._encodeComposite=function(t,e,n,r){var o=function(t,e,n,r){var i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(a.tagByName.hasOwnProperty(t))i=a.tagByName[t];else{if("number"!==typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);i=t}if(i>=31)return r.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=a.tagClassByName[n||"universal"]<<6}(t,e,n,this.reporter);if(r.length<128){var s=i.alloc(2);return s[0]=o,s[1]=r.length,this._createEncoderBuffer([s,r])}for(var u=1,l=r.length;l>=256;l>>=8)u++;var h=i.alloc(2+u);h[0]=o,h[1]=128|u;for(var c=1+u,f=r.length;f>0;c--,f>>=8)h[c]=255&f;return this._createEncoderBuffer([h,r])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var n=i.alloc(2*t.length),r=0;r=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}for(var a=0,s=0;s=128;u>>=7)a++}for(var l=i.alloc(a),h=l.length-1,c=t.length-1;c>=0;c--){var f=t[c];for(l[h--]=127&f;(f>>=7)>0;)l[h--]=128|127&f}return this._createEncoderBuffer(l)},u.prototype._encodeTime=function(t,e){var n,r=new Date(t);return"gentime"===e?n=[l(r.getUTCFullYear()),l(r.getUTCMonth()+1),l(r.getUTCDate()),l(r.getUTCHours()),l(r.getUTCMinutes()),l(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?n=[l(r.getUTCFullYear()%100),l(r.getUTCMonth()+1),l(r.getUTCDate()),l(r.getUTCHours()),l(r.getUTCMinutes()),l(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(n,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"===typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!==typeof t&&!i.isBuffer(t)){var n=t.toArray();!t.sign&&128&n[0]&&n.unshift(0),t=i.from(n)}if(i.isBuffer(t)){var r=t.length;0===t.length&&r++;var o=i.alloc(r);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var a=1,s=t;s>=256;s>>=8)a++;for(var u=new Array(a),l=u.length-1;l>=0;l--)u[l]=255&t,t>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(i.from(u))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"===typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,n){var r,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,n).join()),o.length!==i.defaultBuffer.length)return!1;for(r=0;r>6],i=0===(32&n);if(31===(31&n)){var o=n;for(n=0;128===(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;n<<=7,n|=127&o}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function c(t,e,n){var r=t.readUInt8(n);if(t.isError(r))return r;if(!e&&128===r)return null;if(0===(128&r))return r;var i=127&r;if(i>4)return t.error("length octect is too long");r=0;for(var o=0;o=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){s.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){s.headers[t]=r.merge(o)})),t.exports=s}).call(this,n(26))},function(t,e,n){"use strict";var r=n(47),i=n(619),o=n(354),a=n(621),s=n(624),u=n(625),l=n(358);t.exports=function(t){return new Promise((function(e,h){var c=t.data,f=t.headers;r.isFormData(c)&&delete f["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var p=t.auth.username||"",m=t.auth.password||"";f.Authorization="Basic "+btoa(p+":"+m)}var g=a(t.baseURL,t.url);if(d.open(t.method.toUpperCase(),o(g,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:t,request:d};i(e,h,r),d=null}},d.onabort=function(){d&&(h(l("Request aborted",t,"ECONNABORTED",d)),d=null)},d.onerror=function(){h(l("Network Error",t,null,d)),d=null},d.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),h(l(e,t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var v=n(626),y=(t.withCredentials||u(g))&&t.xsrfCookieName?v.read(t.xsrfCookieName):void 0;y&&(f[t.xsrfHeaderName]=y)}if("setRequestHeader"in d&&r.forEach(f,(function(t,e){"undefined"===typeof c&&"content-type"===e.toLowerCase()?delete f[e]:d.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),t.responseType)try{d.responseType=t.responseType}catch(b){if("json"!==t.responseType)throw b}"function"===typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){d&&(d.abort(),h(t),d=null)})),void 0===c&&(c=null),d.send(c)}))}},function(t,e,n){"use strict";var r=n(620);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";var r=n(47);t.exports=function(t,e){e=e||{};var n={},i=["url","method","params","data"],o=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(i,(function(t){"undefined"!==typeof e[t]&&(n[t]=e[t])})),r.forEach(o,(function(i){r.isObject(e[i])?n[i]=r.deepMerge(t[i],e[i]):"undefined"!==typeof e[i]?n[i]=e[i]:r.isObject(t[i])?n[i]=r.deepMerge(t[i]):"undefined"!==typeof t[i]&&(n[i]=t[i])})),r.forEach(a,(function(r){"undefined"!==typeof e[r]?n[r]=e[r]:"undefined"!==typeof t[r]&&(n[r]=t[r])}));var s=i.concat(o).concat(a),u=Object.keys(e).filter((function(t){return-1===s.indexOf(t)}));return r.forEach(u,(function(r){"undefined"!==typeof e[r]?n[r]=e[r]:"undefined"!==typeof t[r]&&(n[r]=t[r])})),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},,,function(t,e,n){"use strict";var r=n(236),i=n(126),o=n(0),a=n.n(o);function s(t,e){return function(t,e){var n=Object(o.useState)((function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(t){var e=n.value;e!==t&&(n.value=t,n.callback(t,e))}}}}))[0];return n.callback=e,n.facade}(e||null,(function(e){return t.forEach((function(t){return function(t,e){return"function"===typeof t?t(e):t&&(t.current=e),t}(t,e)}))}))}var u={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},l=function(t){var e=t.children;return o.createElement(o.Fragment,null,o.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:u}),e,e&&o.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:u}))};l.propTypes={},l.defaultProps={children:null};var h=function(){return(h=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0})).sort(j)},B=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),F="".concat(B,", [data-focus-guard]"),z=function(t,e){return t.reduce((function(t,n){return t.concat(function t(e,n){var r;return x((null===(r=e.shadowRoot)||void 0===r?void 0:r.children)||e.children).reduce((function(e,r){return e.concat(r.matches(n?F:B)?[r]:[],t(r))}),[])}(n,e),n.parentNode?x(n.parentNode.querySelectorAll(B)).filter((function(t){return t===n})):[])}),[])},U=function(t,e){return x(t).filter((function(t){return function t(e,n){var r=e.get(n);if(void 0!==r)return r;var i=T(n,t.bind(void 0,e));return e.set(n,i),i}(e,t)})).filter((function(t){return function(t){return!((O(t)||function(t){return"BUTTON"===t.tagName}(t))&&("hidden"===t.type||t.disabled))}(t)}))},q=function(t,e){return void 0===e&&(e=new Map),x(t).filter((function(t){return A(e,t)}))},H=function(t,e,n){return L(U(z(t,n),e),!0,n)},W=function(t,e){return L(U(z(t),e),!1)},V=function(t,e){return U(function(t){var e=t.querySelectorAll("[".concat("data-autofocus-inside","]"));return x(e).map((function(t){return z([t])})).reduce((function(t,e){return t.concat(e)}),[])}(t),e)},Y=function t(e,n){return(e.shadowRoot?t(e.shadowRoot,n):Object.getPrototypeOf(e).contains.call(e,n))||x(e.children).some((function(e){return t(e,n)}))},Z=function(){return document.activeElement?document.activeElement.shadowRoot?function t(e){return e.activeElement?e.activeElement.shadowRoot?t(e.activeElement.shadowRoot):e.activeElement:void 0}(document.activeElement.shadowRoot):document.activeElement:void 0},G=function(t){return S(t).filter(Boolean).reduce((function(t,e){var n=e.getAttribute("data-focus-lock");return t.push.apply(t,n?function(t){for(var e=new Set,n=t.length,r=0;r0&&e.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&e.add(r)}return t.filter((function(t,n){return!e.has(n)}))}(x(function t(e){return e.parentNode?t(e.parentNode):e}(e).querySelectorAll("[".concat("data-focus-lock",'="').concat(n,'"]:not([').concat("data-focus-lock-disabled",'="disabled"])')))):[e]),t}),[])},K=function(t){return Boolean(x(t.querySelectorAll("iframe")).some((function(t){return t===document.activeElement})))},$=function(t){var e=document&&Z();return!(!e||e.dataset&&e.dataset.focusGuard)&&G(t).some((function(t){return Y(t,e)||K(t)}))},Q=function(t,e){return P(t)&&t.name?function(t,e){return e.filter(P).filter((function(e){return e.name===t.name})).filter((function(t){return t.checked}))[0]||t}(t,e):t},X=function(t){return t[0]&&t.length>1?Q(t[0],t):t[0]},J=function(t,e){return t.length>1?t.indexOf(Q(t[e],t)):e},tt=function(t,e,n,r){var i=t.length,o=t[0],a=t[i-1],s=R(n);if(!(n&&t.indexOf(n)>=0)){var u=void 0!==n?e.indexOf(n):-1,l=r?e.indexOf(r):u,h=r?t.indexOf(r):-1,c=u-l,f=e.indexOf(o),d=e.indexOf(a),p=function(t){var e=new Set;return t.forEach((function(n){return e.add(Q(n,t))})),t.filter((function(t){return e.has(t)}))}(e),m=(void 0!==n?p.indexOf(n):-1)-(r?p.indexOf(r):u),g=J(t,0),v=J(t,i-1);return-1===u||-1===h?"NEW_FOCUS":!c&&h>=0?h:u<=f&&s&&Math.abs(c)>1?v:u>=d&&s&&Math.abs(c)>1?g:c&&Math.abs(m)>1?h:u<=f?v:u>d?g:c?Math.abs(c)>1?h:(i+h+c)%i:void 0}},et=function t(e,n){return void 0===n&&(n=[]),n.push(e),e.parentNode&&t(e.parentNode.host||e.parentNode,n),n},nt=function(t,e){for(var n=et(t),r=et(e),i=0;i=0)return o}return!1},rt=function(t,e,n){var r=S(t),i=S(e),o=r[0],a=!1;return i.filter(Boolean).forEach((function(t){a=nt(a||t,t)||a,n.filter(Boolean).forEach((function(t){var e=nt(o,t);e&&(a=!a||Y(e,a)?e:nt(e,a))}))})),a},it=function(t,e){var n=document&&Z(),r=G(t).filter(D),i=rt(n||t,t,r),o=new Map,a=W(r,o),s=H(r,o).filter((function(t){var e=t.node;return D(e)}));if(s[0]||(s=a)[0]){var u,l=W([i],o).map((function(t){return t.node})),h=function(t,e){var n=new Map;return e.forEach((function(t){return n.set(t.node,t)})),t.map((function(t){return n.get(t)})).filter(I)}(l,s),c=h.map((function(t){return t.node})),f=tt(c,l,n,e);if("NEW_FOCUS"===f){var d=q(a.map((function(t){return t.node}))).filter((u=function(t,e){return t.reduce((function(t,n){return t.concat(V(n,e))}),[])}(r,o),function(t){var e;return t.autofocus||!!(null===(e=C(t))||void 0===e?void 0:e.autofocus)||u.indexOf(t)>=0}));return{node:d&&d.length?X(d):X(q(c))}}return void 0===f?f:h[f]}},ot=0,at=!1,st=function(t,e,n){void 0===n&&(n={});var r,i,o=it(t,e);if(!at&&o){if(ot>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),at=!0,void setTimeout((function(){at=!1}),1);ot++,r=o.node,i=n.focusOptions,"focus"in r&&r.focus(i),"contentWindow"in r&&r.contentWindow&&r.contentWindow.focus(),ot--}},ut=function(t){var e=G(t).filter(D),n=rt(t,t,e),r=new Map,i=H([n],r,!0),o=H(e,r).filter((function(t){var e=t.node;return D(e)})).map((function(t){return t.node}));return i.map((function(t){var e=t.node;return{node:e,index:t.index,lockItem:o.indexOf(e)>=0,guard:R(e)}}))};function lt(t){var e=window.setImmediate;"undefined"!==typeof e?e(t):setTimeout(t,1)}var ht=function(){return document&&document.activeElement===document.body||function(){var t=document&&Z();return!!t&&x(document.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(e){return Y(e,t)}))}()},ct=null,ft=null,dt=null,pt=!1,mt=function(){return!0};function gt(t,e,n,r){var i=null,o=t;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else{if(!a.lockItem)break;if(o!==t)return;i=null}}while((o+=n)!==e);i&&(i.node.tabIndex=0)}var vt=function(t){return t&&"current"in t?t.current:t},yt=function(){var t,e=!1;if(ct){var n=ct,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,u=n.focusOptions,l=r||dt&&dt.portaledElement,h=document&&document.activeElement;if(l){var c=[l].concat(a.map(vt).filter(Boolean));if(h&&!function(t){return(ct.whiteList||mt)(t)}(h)||(i||(s?Boolean(pt):"meanwhile"===pt)||!ht()||!ft&&o)&&(l&&!($(c)||h&&function(t,e){return e.some((function(e){return function t(e,n,r){return n&&(n.host===e&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&t(e,n.parentNode,r))}(t,e,e)}))}(h,c)||(t=h,dt&&dt.portaledElement===t))&&(document&&!ft&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(e=st(c,ft,{focusOptions:u}),dt={})),pt=!1,ft=document&&document.activeElement),document){var f=document&&document.activeElement,d=ut(c),p=d.map((function(t){return t.node})).indexOf(f);p>-1&&(d.filter((function(t){var e=t.guard,n=t.node;return e&&n.dataset.focusAutoGuard})).forEach((function(t){return t.node.removeAttribute("tabIndex")})),gt(p,d.length,1,d),gt(p,-1,-1,d))}}}return e},bt=function(t){yt()&&t&&(t.stopPropagation(),t.preventDefault())},wt=function(){return lt(yt)},_t=function(t){var e=t.target,n=t.currentTarget;n.contains(e)||(dt={observerNode:n,portaledElement:e})},Mt=function(){pt="just",setTimeout((function(){pt="meanwhile"}),0)};p.assignSyncMedium(_t),m.assignMedium(wt),g.assignMedium((function(t){return t({moveFocusInside:st,focusInside:$})}));var xt=M((function(t){return t.filter((function(t){return!t.disabled}))}),(function(t){var e=t.slice(-1)[0];e&&!ct&&(document.addEventListener("focusin",bt),document.addEventListener("focusout",wt),window.addEventListener("blur",Mt));var n=ct,r=n&&e&&e.id===n.id;ct=e,n&&!r&&(n.onDeactivation(),t.filter((function(t){return t.id===n.id})).length||n.returnFocus(!e)),e?(ft=null,r&&n.observed===e.observed||e.onActivation(),yt(),lt(yt)):(document.removeEventListener("focusin",bt),document.removeEventListener("focusout",wt),window.removeEventListener("blur",Mt),ft=null)}))((function(){return null})),St=o.forwardRef((function(t,e){return o.createElement(w,Object(i.a)({sideCar:xt,ref:e},t))})),kt=w.propTypes||{};kt.sideCar,Object(r.a)(kt,["sideCar"]);St.propTypes={};var Et=St;e.a=Et},function(t,e,n){!function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}var r=function(t){return void 0===t||"auto"===t||"instant"===t||"smooth"===t};function i(t,e){this.scrollLeft=t,this.scrollTop=e}var o=function(t,e,n){return void 0===n&&(n="cannot convert to dictionary."),"Failed to execute '"+t+"' on '"+e+"': "+n},a=function(t,e,n){return o(t,e,"The provided value '"+n+"' is not a valid enum value of type ScrollBehavior.")},s=function(t,e,n){var r,i="__SEAMLESS.BACKUP$"+e;return t[i]||!t[e]||(null===(r=t[e])||void 0===r?void 0:r.__isPolyfill)||(t[i]=t[e]),t[i]||n},u=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)},l=function(){return"scrollBehavior"in window.document.documentElement.style},h=function(t){Object.defineProperty(t,"__isPolyfill",{value:!0})},c=function(t,e){h(e),[HTMLElement.prototype,SVGElement.prototype,Element.prototype].forEach((function(n){s(n,t),n[t]=e}))},f=function(t){return t.ownerDocument.scrollingElement||t.ownerDocument.documentElement},d=function(t){return.5*(1-Math.cos(Math.PI*t))},p=function(){var t,e,n;return null!==(n=null===(e=null===(t=window.performance)||void 0===t?void 0:t.now)||void 0===e?void 0:e.call(t))&&void 0!==n?n:window.Date.now()},m=function t(e){var n=(p()-e.timeStamp)/(e.duration||500);if(n>1)return e.method(e.targetX,e.targetY),void e.callback();var r=(e.timingFunc||d)(n),i=e.startX+(e.targetX-e.startX)*r,o=e.startY+(e.targetY-e.startY)*r;e.method(i,o),e.rafId=window.requestAnimationFrame((function(){t(e)}))},g=function(t){return isFinite(t)?Number(t):0},v=function(t){return function(l,h,c){var d,v=n((d=l).window===d?[f(l.document.documentElement),"Window"]:[l,"Element"],2),y=v[0],b=v[1],w=null!=h?h:{};if(!u(w))throw new TypeError(o(t,b));if(!r(w.behavior))throw new TypeError(a(t,b,w.behavior));"scrollBy"===t&&(w.left=g(w.left)+y.scrollLeft,w.top=g(w.top)+y.scrollTop),function(t,n,r){var o,a;if(function(t){var e;return null!==(e=t.isConnected)&&void 0!==e?e:!(t.ownerDocument&&1&t.ownerDocument.compareDocumentPosition(t))}(t)){var u=t.scrollLeft,l=t.scrollTop,h=g(null!==(o=n.left)&&void 0!==o?o:u),c=g(null!==(a=n.top)&&void 0!==a?a:l);if(h!==u||c!==l){var f=s(HTMLElement.prototype,"scroll",i),d=s(Object.getPrototypeOf(t),"scroll",f).bind(t);if("smooth"===n.behavior){var v=function(){window.removeEventListener("wheel",b),window.removeEventListener("touchmove",b)},y=e(e({},r),{timeStamp:p(),startX:u,startY:l,targetX:h,targetY:c,rafId:0,method:d,callback:v}),b=function(){window.cancelAnimationFrame(y.rafId),v()};window.addEventListener("wheel",b,{passive:!0,once:!0}),window.addEventListener("touchmove",b,{passive:!0,once:!0}),m(y)}else d(h,c)}}}(y,w,c)}},y=v("scroll"),b=v("scrollTo"),w=v("scrollBy"),_=y,M=b,x=w,S=y,k=b,E=w,T=function(t){switch(t){case"horizontal-tb":case"lr":case"lr-tb":case"rl":case"rl-tb":return 0;case"vertical-rl":case"tb":case"tb-rl":return 1;case"vertical-lr":case"tb-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4}return 0},A=function(t,e,r,i){var o,a=0;switch(e||(a^=2),t){case 0:a=a>>1|(1&a)<<1,r=(o=n([i,r],2))[0],i=o[1];break;case 1:case 3:a^=1;break;case 4:a^=2}return[a,r,i]},C=function(t){return 1==(1&A(T(t.writingMode),"rtl"!==t.direction,void 0,void 0)[0])},O=function(t,e,n,r,i,o,a){return 0!==t?t:in||i>e&&o=n&&a>=r?2:o>n&&ar?3:null},P=function(t){return"visible"!==t&&"clip"!==t},N=function(t,e){return(t.clientHeightn?n:t},I=function(t,e,n){switch(t){case 1:return(e+n)/2;case 3:return n;case 2:case 0:return e}},j=function(t,e){var r,i,o,a=null===(r=t.ownerDocument.defaultView)||void 0===r?void 0:r.visualViewport,s=n(t===f(t)?[0,0,null!==(i=null==a?void 0:a.width)&&void 0!==i?i:t.clientWidth,null!==(o=null==a?void 0:a.height)&&void 0!==o?o:t.clientHeight]:[e.left,e.top,t.clientWidth,t.clientHeight],4),u=s[0],l=s[1],h=s[2],c=s[3],d=u+t.clientLeft,p=l+t.clientTop;return[p,d+h,p+c,d]},L=function(t,e,i){var o=e||{};if(!r(o.behavior))throw new TypeError(a("scrollIntoView","Element",o.behavior));(function(t,e){var r=[],i=t.ownerDocument,o=i.defaultView;if(!o)return r;for(var a=window.getComputedStyle(t),s="rtl"!==a.direction,u=n(function(t,e,r){var i=n(A(e,r,t.block||"start",t.inline||"nearest"),3),o=i[0];return[i[1],i[2]].map((function(t,e){switch(t){case"center":return 1;case"nearest":return 0;default:return"start"===t==!(o>>e&1)?2:3}}))}(e,T(a.writingMode||a.getPropertyValue("-webkit-writing-mode")||a.getPropertyValue("-ms-writing-mode")),s),2),l=u[0],h=u[1],c=n(function(t,e,n){var r,i=e.top,o=e.right,a=e.bottom,s=e.left,u=(r=t.ownerDocument,["scroll-margin","scroll-snap-margin"].filter((function(t){return t in r.documentElement.style}))[0]);if(!u)return[i,o,a,s];var l=function(t){var e=n.getPropertyValue(u+"-"+t);return parseInt(e,10)||0};return[i-l("top"),o+l("right"),a+l("bottom"),s-l("left")]}(t,t.getBoundingClientRect(),a),4),f=c[0],d=c[1],p=c[2],m=c[3],g=R(t);null!==g;g=R(g)){if(i!==g.ownerDocument){if(!(o=(i=g.ownerDocument).defaultView))break;var v=g.getBoundingClientRect(),y=v.left,b=v.top;f+=b,d+=y,p+=b,m+=y}var w=o.getComputedStyle(g);if("fixed"===w.position)break;if(N(g,w)){var _=g.getBoundingClientRect(),M=n(j(g,_),4),x=M[0],S=M[1],k=M[2],E=M[3],P=O(l,E,S,g.clientWidth,m,d,d-m),L=O(h,x,k,g.clientHeight,f,p,p-f),B=null===P?0:I(P,m,d)-I(P,E,S),F=null===L?0:I(L,f,p)-I(L,x,k),z=C(w)?D(B,-g.scrollWidth+g.clientWidth-g.scrollLeft,-g.scrollLeft):D(B,-g.scrollLeft,g.scrollWidth-g.clientWidth-g.scrollLeft),U=D(F,-g.scrollTop,g.scrollHeight-g.clientHeight-g.scrollTop);r.push([g,{left:g.scrollLeft+z,top:g.scrollTop+U,behavior:e.behavior}]),f=Math.max(f-U,x),d=Math.min(d-z,S),p=Math.min(p-U,k),m=Math.max(m-z,E)}}return r})(t,o).forEach((function(t){var e=n(t,2),r=e[0],o=e[1];_(r,o,i)}))},B=L,F=function(t,e){return function(n){if(!l()){var r={scroll:y,scrollTo:b,scrollBy:w}[t];e(t,(function(){var t=arguments;if(1!==arguments.length){var e=t[0],i=t[1];r(this,{left:e,top:i})}else r(this,t[0],n)}))}}},z=F("scroll",c),U=F("scrollTo",c),q=F("scrollBy",c),H=function(t,e){h(e),s(window,t),window[t]=e},W=F("scroll",H),V=F("scrollTo",H),Y=F("scrollBy",H);function Z(t){B(this,{block:null==t||t?"start":"end",inline:"nearest"})}var G=function(t){if(!l()){var e=s(window.HTMLElement.prototype,"scrollIntoView",Z);c("scrollIntoView",(function(){var n=arguments,r=n[0];1===n.length&&u(r)?B(this,r,t):e.apply(this,n)}))}};t.elementScroll=_,t.elementScrollBy=x,t.elementScrollByPolyfill=q,t.elementScrollIntoView=B,t.elementScrollIntoViewPolyfill=G,t.elementScrollPolyfill=z,t.elementScrollTo=M,t.elementScrollToPolyfill=U,t.modifyWindow=H,t.polyfill=function(t){l()||(z(t),U(t),q(t),G(t),W(t),V(t),Y(t))},t.scroll=y,t.scrollBy=w,t.scrollIntoView=L,t.scrollTo=b,t.windowScroll=S,t.windowScrollBy=E,t.windowScrollByPolyfill=Y,t.windowScrollPolyfill=W,t.windowScrollTo=k,t.windowScrollToPolyfill=V,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){"use strict";(function(e,r){function i(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o=n(0),a=i(o),s=n(227),u=i(s),l=i(n(513)),h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n\x20\t\r\n\f]+)/i.exec(e)||["",""])[1].toLowerCase()];if(n)for(var r=0;r"+e+"";for(y.body.innerHTML=e,t.bootstrap(y);this.content.firstChild;)u.call(this.content,this.content.firstChild);if(e=y.body,n)for(r=0;r"+this.innerHTML+""},set:function(t){if(!this.parentNode)throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");for(y.body.innerHTML=t,t=this.ownerDocument.createDocumentFragment();y.body.firstChild;)l.call(t,y.body.firstChild);h.call(this.parentNode,t,this)},configurable:!0})};S(t.prototype),k(t.prototype),t.bootstrap=function(n){for(var r,i=0,o=(n=e(n,"template")).length;i]/g,A=function(t){switch(t){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"\xa0":return" "}},C=(w=function(t){for(var e={},n=0;n";break t;case Node.TEXT_NODE:u=u.data,u=l&&O[l.localName]?u:u.replace(T,A);break t;case Node.COMMENT_NODE:u="\x3c!--"+u.data+"--\x3e";break t;default:throw window.console.error(u),Error("not implemented")}}i+=u}return i}}if(n||v){t.sa=function(t,e){var n=o.call(t,!1);return this.Z&&this.Z(n),e&&(l.call(n.content,o.call(t.content,!0)),N(n.content,t.content)),n};var N=function(n,r){if(r.querySelectorAll&&0!==(r=e(r,"template")).length)for(var i,o,a=0,s=(n=e(n,"template")).length;a]/g;function Oe(t){switch(t){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"\xa0":return" "}}function Pe(t){for(var e={},n=0;n";break t;case Node.TEXT_NODE:s=s.data,s=u&&Re[u.localName]?s:s.replace(Ce,Oe);break t;case Node.COMMENT_NODE:s="\x3c!--"+s.data+"--\x3e";break t;default:throw window.console.error(s),Error("not implemented")}}n+=s}return n}var Ie=Jt.H,je={querySelector:function(t){return this.__shady_native_querySelector(t)},querySelectorAll:function(t){return this.__shady_native_querySelectorAll(t)}},Le={};function Be(t){Le[t]=function(e){return e["__shady_native_"+t]}}function Fe(t,e){for(var n in ve(t,e,"__shady_native_"),e)Be(n)}function ze(t,e){e=void 0===e?[]:e;for(var n=0;ni.assignedNodes.length&&(i.xa=!0)}i.xa&&(i.xa=!1,jr(this,e))}for(e=this.g,n=[],i=0;in.indexOf(r))||n.push(r);for(e=0;e "+e})))}return{value:t,Ua:e,stop:o}}(o,i,e,n),r=r||t.stop,i=t.Ua,o=t.value),i+o})),o&&(t=function(t,e){var n=t.split("\ue000");return e.reduce((function(t,e,r){return t+e+n[r+1]}),n[0])}(t,a)),i&&(t=na(t)),t.replace(ca,(function(t,e,n,r){return'[dir="'+n+'"] '+e+r+", "+e+'[dir="'+n+'"]'+r}))},Go.prototype.i=function(t){return t.match(":host")?"":t.match("::slotted")?this.h(t,":not(.style-scope)"):ra(t.trim(),":not(.style-scope)")},o.Object.defineProperties(Go.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var oa=/:(nth[-\w]+)\(([^)]+)\)/,aa=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,sa=/[[.:#*]/,ua=/^(::slotted)/,la=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ha=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ca=/(.*):dir\((?:(ltr|rtl))\)(.*)/,fa=/:(?:matches|any|-(?:webkit|moz)-any)/,da=new Go;function pa(t,e,n,r,i){this.M=t||null,this.h=e||null,this.za=n||[],this.K=null,this.cssBuild=i||"",this.ha=r||"",this.g=this.L=this.R=null}function ma(t){return t?t.__styleInfo:null}function ga(t,e){return t.__styleInfo=e}function va(t){var e=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return e&&e.call(this,t)}pa.prototype.i=function(){return this.M},pa.prototype._getStyleRules=pa.prototype.i;var ya=/:host\s*>\s*/,ba=navigator.userAgent.match("Trident");function wa(){}function _a(t){if(!t.D){var e={},n={};Ma(t,n)&&(e.P=n,t.rules=null),e.cssText=t.parsedCssText.replace(Po,"").replace(Eo,""),t.D=e}}function Ma(t,e){var n=t.D;if(!n){n=t.parsedCssText;for(var r;t=Eo.exec(n);)"inherit"===(r=(t[2]||t[3]).trim())&&"unset"===r||(e[t[1].trim()]=r),r=!0;return r}if(n.P)return Object.assign(e,n.P),!0}function xa(t,e,n){return e&&(e=0<=e.indexOf(";")?Sa(t,e,n):function t(e,n){var r=e.indexOf("var(");if(-1===r)return n(e,"","","");var i=Uo(e,r+3),o=e.substring(r+4,i);return r=e.substring(0,r),e=t(e.substring(i+1),n),-1===(i=o.indexOf(","))?n(r,o.trim(),"",e):n(r,o.substring(0,i).trim(),o.substring(i+1).trim(),e)}(e,(function(e,r,i,o){return r?((r=xa(t,n[r],n))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=xa(t,n[i]||i,n)||i,e+(r||"")+o):e+o}))),e&&e.trim()||""}function Sa(t,e,n){e=e.split(";");for(var r,i,o=0;o *."+i||-1!==o.indexOf("html"))&&0===o.indexOf(i)),(a||s)&&(n=i,s&&(e.F||(e.F=ea(da,e,da.h,t?"."+t:"",i)),n=e.F||i),a&&"html"===i&&(n=e.F||e.O),r({Ba:n,ab:s,qb:a}))}}(t,e,n,(function(n){va.call(t._element||t,n.Ba)&&(n.ab?Ma(e,r):Ma(e,i))}))}),null,!0),{hb:i,Za:r}}(e,n.M,n.cssBuild),e=function(t,e){var n={},r=[];return jo(t,(function(t){t.D||_a(t);var i=t.F||t.parsedSelector;e&&t.D.P&&i&&va.call(e,i)&&(Ma(t,n),t=t.index,i=parseInt(t/32,10),r[i]=(r[i]||0)|1<+~])"),s=ma(e);i=s.M,s=s.cssBuild;var u=function(t,e){t=t.h;var n={};if(!Mo&&t)for(var r=0,i=t[r];r=l._useCount&&l.parentNode&&l.parentNode.removeChild(l)),Mo?u.g?(u.g.textContent=s,a=u.g):s&&(a=Lo(s,o,t.shadowRoot,u.h)):a?a.parentNode||(ba&&-1e&&-1==[34,35,60,62,63,96].indexOf(e)?t:encodeURIComponent(t)}function r(t){var e=t.charCodeAt(0);return 32e&&-1==[34,35,60,62,96].indexOf(e)?t:encodeURIComponent(t)}function i(t,i,a){var s=i||"scheme start",u=0,d="",p=!1,m=!1;t:for(;(null!=t[u-1]||0==u)&&!this.m;){var g=t[u];switch(s){case"scheme start":if(!g||!c.test(g)){if(i)break t;d="",s="no scheme";continue}d+=g.toLowerCase(),s="scheme";break;case"scheme":if(g&&f.test(g))d+=g.toLowerCase();else{if(":"!=g){if(i)break t;d="",u=0,s="no scheme";continue}if(this.l=d,d="",i)break t;void 0!==l[this.l]&&(this.G=!0),s="file"==this.l?"relative":this.G&&a&&a.l==this.l?"relative or authority":this.G?"authority first slash":"scheme data"}break;case"scheme data":"?"==g?(this.A="?",s="query"):"#"==g?(this.C="#",s="fragment"):null!=g&&"\t"!=g&&"\n"!=g&&"\r"!=g&&(this.va+=n(g));break;case"no scheme":if(a&&void 0!==l[a.l]){s="relative";continue}o.call(this),this.m=!0;break;case"relative or authority":if("/"!=g||"/"!=t[u+1]){s="relative";continue}s="authority ignore slashes";break;case"relative":if(this.G=!0,"file"!=this.l&&(this.l=a.l),null==g){this.o=a.o,this.v=a.v,this.s=a.s.slice(),this.A=a.A,this.B=a.B,this.j=a.j;break t}if("/"==g||"\\"==g)s="relative slash";else if("?"==g)this.o=a.o,this.v=a.v,this.s=a.s.slice(),this.A="?",this.B=a.B,this.j=a.j,s="query";else{if("#"!=g){s=t[u+1];var v=t[u+2];("file"!=this.l||!c.test(g)||":"!=s&&"|"!=s||null!=v&&"/"!=v&&"\\"!=v&&"?"!=v&&"#"!=v)&&(this.o=a.o,this.v=a.v,this.B=a.B,this.j=a.j,this.s=a.s.slice(),this.s.pop()),s="relative path";continue}this.o=a.o,this.v=a.v,this.s=a.s.slice(),this.A=a.A,this.C="#",this.B=a.B,this.j=a.j,s="fragment"}break;case"relative slash":if("/"!=g&&"\\"!=g){"file"!=this.l&&(this.o=a.o,this.v=a.v,this.B=a.B,this.j=a.j),s="relative path";continue}s="file"==this.l?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=g){s="authority ignore slashes";continue}s="authority second slash";break;case"authority second slash":if(s="authority ignore slashes","/"!=g)continue;break;case"authority ignore slashes":if("/"!=g&&"\\"!=g){s="authority";continue}break;case"authority":if("@"==g){for(p&&(d+="%40"),p=!0,g=0;gx.length-16&&(l.randomFillSync(x),S=0),x.slice(S,S+=16)}for(var E=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,T=[],A=0;A<256;++A)T.push((A+256).toString(16).substr(1));function C(t,e,n){var r=(t=t||{}).random||(t.rng||k)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(T[t[e+0]]+T[t[e+1]]+T[t[e+2]]+T[t[e+3]]+"-"+T[t[e+4]]+T[t[e+5]]+"-"+T[t[e+6]]+T[t[e+7]]+"-"+T[t[e+8]]+T[t[e+9]]+"-"+T[t[e+10]]+T[t[e+11]]+T[t[e+12]]+T[t[e+13]]+T[t[e+14]]+T[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&E.test(t)}(n))throw TypeError("Stringified UUID is invalid");return n}(r)}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function N(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}var D,I,j=function(t){return t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))},L={null:null,false:!1,true:!0},B=function(t){return void 0!==L[t]?L[t]:t},F=function(t){return t&&t.Math==Math&&t},z=F("object"==typeof globalThis&&globalThis)||F("object"==typeof window&&window)||F("object"==typeof self&&self)||F("object"==typeof h&&h)||function(){return this}()||Function("return this")(),U=function(t){try{return!!t()}catch(t){return!0}},q=!U((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),H=Function.prototype.call,W=H.bind?H.bind(H):function(){return H.apply(H,arguments)},V={}.propertyIsEnumerable,Y=Object.getOwnPropertyDescriptor,Z={f:Y&&!V.call({1:2},1)?function(t){var e=Y(this,t);return!!e&&e.enumerable}:V},G=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},K=Function.prototype,$=K.bind,Q=K.call,X=$&&$.bind(Q),J=$?function(t){return t&&X(Q,t)}:function(t){return t&&function(){return Q.apply(t,arguments)}},tt=J({}.toString),et=J("".slice),nt=function(t){return et(tt(t),8,-1)},rt=z.Object,it=J("".split),ot=U((function(){return!rt("z").propertyIsEnumerable(0)}))?function(t){return"String"==nt(t)?it(t,""):rt(t)}:rt,at=z.TypeError,st=function(t){if(null==t)throw at("Can't call method on "+t);return t},ut=function(t){return ot(st(t))},lt=function(t){return"function"==typeof t},ht=function(t){return"object"==typeof t?null!==t:lt(t)},ct=function(t){return lt(t)?t:void 0},ft=function(t,e){return arguments.length<2?ct(z[t]):z[t]&&z[t][e]},dt=J({}.isPrototypeOf),pt=ft("navigator","userAgent")||"",mt=z.process,gt=z.Deno,vt=mt&&mt.versions||gt&>.version,yt=vt&&vt.v8;yt&&(I=(D=yt.split("."))[0]>0&&D[0]<4?1:+(D[0]+D[1])),!I&&pt&&(!(D=pt.match(/Edge\/(\d+)/))||D[1]>=74)&&(D=pt.match(/Chrome\/(\d+)/))&&(I=+D[1]);var bt=I,wt=!!Object.getOwnPropertySymbols&&!U((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&bt&&bt<41})),_t=wt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Mt=z.Object,xt=_t?function(t){return"symbol"==typeof t}:function(t){var e=ft("Symbol");return lt(e)&&dt(e.prototype,Mt(t))},St=z.String,kt=function(t){try{return St(t)}catch(t){return"Object"}},Et=z.TypeError,Tt=function(t){if(lt(t))return t;throw Et(kt(t)+" is not a function")},At=function(t,e){var n=t[e];return null==n?void 0:Tt(n)},Ct=z.TypeError,Ot=Object.defineProperty,Pt=function(t,e){try{Ot(z,t,{value:e,configurable:!0,writable:!0})}catch(a){z[t]=e}return e},Nt=z["__core-js_shared__"]||Pt("__core-js_shared__",{}),Rt=c((function(t){(t.exports=function(t,e){return Nt[t]||(Nt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.1",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),Dt=z.Object,It=function(t){return Dt(st(t))},jt=J({}.hasOwnProperty),Lt=Object.hasOwn||function(t,e){return jt(It(t),e)},Bt=0,Ft=Math.random(),zt=J(1..toString),Ut=function(t){return"Symbol("+(void 0===t?"":t)+")_"+zt(++Bt+Ft,36)},qt=Rt("wks"),Ht=z.Symbol,Wt=Ht&&Ht.for,Vt=_t?Ht:Ht&&Ht.withoutSetter||Ut,Yt=function(t){if(!Lt(qt,t)||!wt&&"string"!=typeof qt[t]){var e="Symbol."+t;wt&&Lt(Ht,t)?qt[t]=Ht[t]:qt[t]=_t&&Wt?Wt(e):Vt(e)}return qt[t]},Zt=z.TypeError,Gt=Yt("toPrimitive"),Kt=function(t){var e=function(t,e){if(!ht(t)||xt(t))return t;var n,r=At(t,Gt);if(r){if(void 0===e&&(e="default"),n=W(r,t,e),!ht(n)||xt(n))return n;throw Zt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&<(n=t.toString)&&!ht(r=W(n,t)))return r;if(lt(n=t.valueOf)&&!ht(r=W(n,t)))return r;if("string"!==e&<(n=t.toString)&&!ht(r=W(n,t)))return r;throw Ct("Can't convert object to primitive value")}(t,e)}(t,"string");return xt(e)?e:e+""},$t=z.document,Qt=ht($t)&&ht($t.createElement),Xt=function(t){return Qt?$t.createElement(t):{}},Jt=!q&&!U((function(){return 7!=Object.defineProperty(Xt("div"),"a",{get:function(){return 7}}).a})),te=Object.getOwnPropertyDescriptor,ee={f:q?te:function(t,e){if(t=ut(t),e=Kt(e),Jt)try{return te(t,e)}catch(t){}if(Lt(t,e))return G(!W(Z.f,t,e),t[e])}},ne=z.String,re=z.TypeError,ie=function(t){if(ht(t))return t;throw re(ne(t)+" is not an object")},oe=z.TypeError,ae=Object.defineProperty,se={f:q?ae:function(t,e,n){if(ie(t),e=Kt(e),ie(n),Jt)try{return ae(t,e,n)}catch(t){}if("get"in n||"set"in n)throw oe("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},ue=q?function(t,e,n){return se.f(t,e,G(1,n))}:function(t,e,n){return t[e]=n,t},le=J(Function.toString);lt(Nt.inspectSource)||(Nt.inspectSource=function(t){return le(t)});var he,ce,fe,de=Nt.inspectSource,pe=z.WeakMap,me=lt(pe)&&/native code/.test(de(pe)),ge=Rt("keys"),ve=function(t){return ge[t]||(ge[t]=Ut(t))},ye={},be=z.TypeError,we=z.WeakMap;if(me||Nt.state){var _e=Nt.state||(Nt.state=new we),Me=J(_e.get),xe=J(_e.has),Se=J(_e.set);he=function(t,e){if(xe(_e,t))throw new be("Object already initialized");return e.facade=t,Se(_e,t,e),e},ce=function(t){return Me(_e,t)||{}},fe=function(t){return xe(_e,t)}}else{var ke=ve("state");ye[ke]=!0,he=function(t,e){if(Lt(t,ke))throw new be("Object already initialized");return e.facade=t,ue(t,ke,e),e},ce=function(t){return Lt(t,ke)?t[ke]:{}},fe=function(t){return Lt(t,ke)}}var Ee={set:he,get:ce,has:fe,enforce:function(t){return fe(t)?ce(t):he(t,{})},getterFor:function(t){return function(e){var n;if(!ht(e)||(n=ce(e)).type!==t)throw be("Incompatible receiver, "+t+" required");return n}}},Te=Function.prototype,Ae=q&&Object.getOwnPropertyDescriptor,Ce=Lt(Te,"name"),Oe={EXISTS:Ce,PROPER:Ce&&"something"===function(){}.name,CONFIGURABLE:Ce&&(!q||q&&Ae(Te,"name").configurable)},Pe=c((function(t){var e=Oe.CONFIGURABLE,n=Ee.get,r=Ee.enforce,i=String(String).split("String");(t.exports=function(t,n,o,a){var s,u=!!a&&!!a.unsafe,l=!!a&&!!a.enumerable,h=!!a&&!!a.noTargetGet,c=a&&void 0!==a.name?a.name:n;lt(o)&&("Symbol("===String(c).slice(0,7)&&(c="["+String(c).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Lt(o,"name")||e&&o.name!==c)&&ue(o,"name",c),(s=r(o)).source||(s.source=i.join("string"==typeof c?c:""))),t!==z?(u?!h&&t[n]&&(l=!0):delete t[n],l?t[n]=o:ue(t,n,o)):l?t[n]=o:Pt(n,o)})(Function.prototype,"toString",(function(){return lt(this)&&n(this).source||de(this)}))})),Ne=Math.ceil,Re=Math.floor,De=function(t){var e=+t;return e!=e||0===e?0:(e>0?Re:Ne)(e)},Ie=Math.max,je=Math.min,Le=Math.min,Be=function(t){return(e=t.length)>0?Le(De(e),9007199254740991):0;var e},Fe=function(t){return function(e,n,r){var i,o=ut(e),a=Be(o),s=function(t,e){var n=De(t);return n<0?Ie(n+e,0):je(n,e)}(r,a);if(t&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},ze=(Fe(!0),Fe(!1)),Ue=J([].push),qe=function(t,e){var n,r=ut(t),i=0,o=[];for(n in r)!Lt(ye,n)&&Lt(r,n)&&Ue(o,n);for(;e.length>i;)Lt(r,n=e[i++])&&(~ze(o,n)||Ue(o,n));return o},He=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],We=He.concat("length","prototype"),Ve={f:Object.getOwnPropertyNames||function(t){return qe(t,We)}},Ye={f:Object.getOwnPropertySymbols},Ze=J([].concat),Ge=ft("Reflect","ownKeys")||function(t){var e=Ve.f(ie(t)),n=Ye.f;return n?Ze(e,n(t)):e},Ke=function(t,e){for(var n=Ge(e),r=se.f,i=ee.f,o=0;oo;o++)if((s=v(t[o]))&&dt(Nn,s))return s;return new Pn(!1)}r=function(t,e){var n=arguments.length<2?Tn(t):e;if(Tt(n))return ie(W(n,t));throw An(kt(t)+" is not iterable")}(t,i)}for(u=r.next;!(l=W(u,r)).done;){try{s=v(l.value)}catch(t){Cn(r,"throw",t)}if("object"==typeof s&&s&&dt(Nn,s))return s}return new Pn(!1)},Dn=z.TypeError,In=function(t,e){if(dt(e,t))return t;throw Dn("Incorrect invocation")},jn=Yt("iterator"),Ln=!1;try{var Bn=0,Fn={next:function(){return{done:!!Bn++}},return:function(){Ln=!0}};Fn[jn]=function(){return this},Array.from(Fn,(function(){throw 2}))}catch(i){}var zn,Un=se.f,qn=Yt("toStringTag"),Hn=function(t,e,n){t&&!Lt(t=n?t:t.prototype,qn)&&Un(t,qn,{configurable:!0,value:e})},Wn=z.String,Vn=z.TypeError,Yn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=J(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return ie(n),function(t){if("object"==typeof t||lt(t))return t;throw Vn("Can't set "+Wn(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),Zn=Object.keys||function(t){return qe(t,He)},Gn=q?Object.defineProperties:function(t,e){ie(t);for(var n,r=ut(e),i=Zn(e),o=i.length,a=0;o>a;)se.f(t,n=i[a++],r[n]);return t},Kn=ft("document","documentElement"),$n=ve("IE_PROTO"),Qn=function(){},Xn=function(t){return"